dimensions#

property UniformGrid.dimensions: Tuple[int, int, int]#

Return the grid’s dimensions.

These are effectively the number of points along each of the three dataset axes.

Examples

Create a uniform grid with dimensions (1, 2, 3).

>>> import pyvista
>>> grid = pyvista.UniformGrid(dims=(2, 3, 4))
>>> grid.dimensions
(2, 3, 4)
>>> grid.plot(show_edges=True)
../../../_images/pyvista-UniformGrid-dimensions-1_00_00.png

Set the dimensions to (3, 4, 5)

>>> grid.dimensions = (3, 4, 5)
>>> grid.plot(show_edges=True)
../../../_images/pyvista-UniformGrid-dimensions-1_01_00.png