1

I am unable to interact with pyvista plots either on jupyter notebook or lab. I am working on a geometric problem and want to check output of the code both in graphs and text (e.g., check vertex coordinates or face normals of a mesh). I get interactive Pyvista plots if I just run the code in a py script, but it is a slow workflow and have to check print() results somewhere else. I am adding

pl.show(jupyter_backend='pythreejs')

as the pyvista documentations suggests, but I still get a static plot. It's the same problem in VS Code, where I started. I thought it might be VS Code so I installed Jupyter notebook and jupyter lab. No success. I really appreciate any help. It's frustrating to get stuck in the first step of visually checking the output in an interactive way which is necessary for solving a geometric problem, not to mention posting it later online. Appreciate any help.

modinar
  • 13
  • 2
  • There's a known issue about pyvista being incompatible with `ipywidgets>7.7.2`, see https://github.com/pyvista/pyvista/issues/3274. But your issue sounds different: with this issue I'd expect no plot to be generated at all. Still, you should try downgrading `ipywidgets` in your environment to 7.7.2 or older and see if this fixes the issue (and please report back). – Andras Deak -- Слава Україні Sep 26 '22 at 20:52
  • 1
    @AndrasDeak--СлаваУкраїні Thanks for the suggestion. I installed `ipywidgets>7.7.2` and the plot became interactive in VS Code, but only if I set the backend to `ipyvtklink`; `pythreejs` didn't work. Also, when I ran this in Jupyter Lab, I got the object back `(vtkmodules.vtkRenderingOpenGL2.vtkOpenGLActor)0000012ECF131220`, not the actual plot. – modinar Sep 29 '22 at 01:24

0 Answers0