pyvista.examples.cells.Vertex

Contents

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)
../../../_images/pyvista-examples-cells-Vertex-1_00_00.png