Open gewitterblitz opened 3 years ago
Per #175, the following code
#https://github.com/pyvista/pyvista-support/issues/175
import pyvista as pv
from pyvista import examples
# pv.rcParams['volume_mapper'] = 'fixed_point'
model = examples.download_damavand_volcano()
opacity = [0, 0.75, 0, 0.75, 1.0]
clim = [0, 100]
p = pv.Plotter(notebook=False)
p.add_volume(model, cmap="magma", clim=clim,
opacity=opacity, opacity_unit_distance=6000,)
p.show(screenshot='volcano.png',return_viewer=True)
creates an external window containing expected output
but fails to save any png file.
If I use p = pv.Plotter(notebook=False,off_screen=True)
instead, I get an empty plot in volcano.png file
However, for my data, even the external window generated using just p = pv.Plotter(notebook=False)
does not show any isosurfaces:
Using panel
requires the intermediate translation to vtk.js, and this has a variety of issues (including failing to convert over a variety of VTK objects to the js world).
As for off_screen
, this is likely to be a VTK issue and probably will have to be raised on their forms.
If you absolutely need to have off_screen plotting, you might try compiling vtk with EGL on Mac (though I've never compiled VTK on a Mac with EGL). See https://docs.pyvista.org/extras/building_vtk.html
Hi,
Pyvista newbie here. I am trying to plot an isosurface plot from a 3D uniform gird. I see the output when using panel backend in the jupyter notebook (using Jlab 3.x) but the isosurfaces disappear when using
off_screen = True
kwarg in pv.Plotter()Here's the output of pv.Report()