z

property RectilinearGrid.z: numpy.ndarray

Return or set the coordinates along the Z-direction.

Examples

Return the z coordinates of a RectilinearGrid.

>>> import numpy as np
>>> import pyvista
>>> xrng = np.arange(-10, 10, 10, dtype=float)
>>> yrng = np.arange(-10, 10, 10, dtype=float)
>>> zrng = np.arange(-10, 10, 10, dtype=float)
>>> grid = pyvista.RectilinearGrid(xrng, yrng, zrng)
>>> grid.z
array([-10.,   0.])

Set the z coordinates of a RectilinearGrid.

>>> grid.z = [-10.0, 0.0, 10.0]
>>> grid.z
array([-10.,   0.,  10.])