pyvista.examples.cells.plot_cell#

plot_cell(grid, cpos=None, **kwargs)[source]#

Plot a pyvista.UnstructuredGrid while displaying cell indices.

Parameters:
gridpyvista.UnstructuredGrid

Unstructured grid (ideally) containing a single cell.

cposstr, optional

Camera position.

**kwargsdict, optional

Additional keyword arguments when showing. See pyvista.Plotter.show().

Examples

Create and plot a single hexahedron.

>>> from pyvista import examples
>>> grid = examples.cells.Hexahedron()
>>> examples.plot_cell(grid)
../../../_images/pyvista-examples-cells-plot_cell-1_00_00.png