hide_cells

ExplicitStructuredGrid.hide_cells(ind, inplace=True)

Hide specific cells.

Hides cells by setting the ghost cell array to HIDDENCELL.

Parameters
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.

Returns
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.

Examples

>>> 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)
../../../_images/pyvista-ExplicitStructuredGrid-hide_cells-1_00_00.png