store_image

property Plotter.store_image

Store last rendered frame on close.

This is normally disabled to avoid caching the image, and is enabled by default by setting:

pyvista.BUILDING_GALLERY = True

Examples

>>> import pyvista
>>> pl = pyvista.Plotter(off_screen=True)
>>> pl.store_image = True
>>> _ = pl.add_mesh(pyvista.Cube())
>>> pl.show()
../../../_images/pyvista-Plotter-store_image-1_00_00.png
>>> image = pl.last_image
>>> type(image)  
<class 'numpy.ndarray'>