pyvista.Plotter.save_graphic#
- Plotter.save_graphic(
- filename,
- title='PyVista Export',
- raster=True,
- painter=True,
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 to fsave 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
>>> 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")