pyvista.examples.cells.Vertex#

Vertex() UnstructuredGrid[source]#

Create a pyvista.UnstructuredGrid containing a single Vertex.

This cell corresponds to the pyvista.CellType.VERTEX cell type.

Returns:
pyvista.UnstructuredGrid

UnstructuredGrid containing a single vertex.

Examples

Create and plot a single vertex.

>>> from pyvista import examples
>>> grid = examples.cells.Vertex()
>>> examples.plot_cell(grid)

List the grid’s cells.

>>> grid.cells
array([1, 0])

List the grid’s points.

>>> grid.points
pyvista_ndarray([[0., 0., 0.]])
>>> grid.celltypes  # same as pyvista.CellType.VERTEX
array([1], dtype=uint8)
https://d33wubrfki0l68.cloudfront.net/47141bff8b8c933f8b413b014a65bc74903192db/5b3a5/_images/pyvista-examples-cells-vertex-1_00_00.png