-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I was working on the following code, which displays a window despite calling vpl.save_fig() with off_screen=True, when I discovered that the real culprit is the call to zoom_to_contents() displaying the window.
Looking at the code, I believe it's because of a call to screenshot_fig(). Perhaps it would be better to pass off_screen=True to this call, although I don't know if there are any implications if the plot is already on screen.
import vtkplotlib as vpl
from stl.mesh import Mesh
mesh = Mesh.from_file(vpl.data.get_rabbit_stl())
vpl.mesh_plot(mesh, color='orange')
vpl.view(up_view=(0, 0, 1), camera_position=(0, -1, 0))
vpl.reset_camera()
vpl.zoom_to_contents()
vpl.save_fig(pixels=600, off_screen=True, path='/tmp/rabbit.png')
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working