Plotter.save_graphic#
- Plotter.save_graphic( ) None[source]#
Save a screenshot of the rendering window as a graphic file.
This can be helpful for publication documents.
The supported formats are:
'.svg''.eps''.ps''.pdf''.tex'
- Parameters:
- filename
str|Path Path to save the graphic file to.
- title
str, default: “PyVista Export” Title to use within the file properties.
- rasterbool, default:
True Attempt to write 3D properties as a raster image.
- painterbool, default:
True Configure the exporter to expect a painter-ordered 2D rendering, that is, a rendering at a fixed depth where primitives are drawn from the bottom up.
- filename
Examples#
Download Python source code | Download Jupyter notebook
>>> import pyvista as pv
>>> from pyvista import examples
>>> pl = pv.Plotter()
>>> _ = pl.add_mesh(examples.load_airplane(), smooth_shading=True)
>>> _ = pl.add_background_image(examples.mapfile)
>>> pl.save_graphic('img.svg')