How to export high quality image from the plot #1888
-
|
Hi, So my question is, whether it is possible to set DPI directly somewhere? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
|
Hey @changliao1025, Great to hear from you. Okay, as far as I'm aware you can't control the DPI from However, you could take the following approach to hand-off the saving with the relevant controls to import matplotlib.pyplot as plt
import pyvista as pv
plotter = pv.Plotter(off_screen=True)
_ = plotter.add_mesh(pv.Sphere())
plotter.show()
plt.imshow(plotter.image)
plt.savefig("sphere.png", dpi=500)The resultant
Is this suitable for your workflow? |
Beta Was this translation helpful? Give feedback.



@changliao1025
If you play around with the following options, you may be able to hit the quality sweetspot e.g.,
Does this help?