ExplicitStructuredGrid.hide_cells(ind, inplace=True)

Hide specific cells.

Hides cells by setting the ghost cell array to HIDDENCELL.

indint or iterable(int)

Cell indices to be hidden. A boolean array of the same size as the number of cells also is acceptable.

inplacebool, optional

This method is applied to this grid if True (default) or to a copy otherwise.

ExplicitStructuredGrid or None

A deep copy of this grid if inplace=False with the hidden cells, or this grid with the hidden cells if otherwise.


>>> from pyvista import examples
>>> grid = examples.load_explicit_structured()
>>> _ = grid.hide_cells(range(80, 120))
>>> grid.plot(color='w', show_edges=True, show_bounds=True)