Plotter.image

Plotter.image#

property Plotter.image: NumpyArray[np.uint8][source]#

Return an image array of current render window.

Changed in version 0.50: A RuntimeError is raised instead of an AttributeError when the plotter has not been rendered.

Returns:
numpy.ndarray

Image array of current render window.

Examples#

Download Python source code | Download Jupyter notebook

>>> import pyvista as pv
>>> pl = pv.Plotter(off_screen=True)
>>> _ = pl.add_mesh(pv.Cube())
>>> pl.show()
../../../_images/pyvista-Plotter-image-fadd972370937e73_00_00.png