Skip to content
Discussion options

You must be logged in to vote

@changliao1025

If you play around with the following options, you may be able to hit the quality sweetspot e.g.,

import matplotlib.pyplot as plt
import pyvista as pv

plotter = pv.Plotter(off_screen=True)

plotter.window_size = (640, 480)       #  <--- set the window size
plotter.image_scale = 10               #  <--- scale screenshot image i.e., window_size * image_scale 

_ = plotter.add_mesh(pv.Sphere())
plotter.show()

plt.imshow(plotter.image)
plt.axis("off")
plt.savefig("sphere.png", dpi=500, bbox_inches="tight", pad_inches=0)

Does this help?

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@bjlittle
Comment options

@changliao1025
Comment options

@changliao1025
Comment options

@bjlittle
Comment options

Answer selected by bjlittle
@bjlittle
Comment options

@bjlittle
Comment options

@changliao1025
Comment options

@bjlittle
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants