Plotter.image#
- property Plotter.image: NDArray[np.uint8][source]#
Return an image array of current render window.
The image has an alpha channel when the plotter has a transparent background, which is set by the theme and by
screenshot(). With the'straight'and'premultiplied'options, reading the image renders the scene again over a black background; seescreenshot().Added in version 0.50: Support for the
'straight'and'premultiplied'transparent backgrounds.Changed in version 0.50: A
RuntimeErroris raised instead of anAttributeErrorwhen the plotter has not been rendered.- Returns:
numpy.ndarrayImage 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()
>>> pl.image
Used In#
Gallery Examples