-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-panel plot in Jupyter Lab #1070
Comments
Thank you for the prompt answer. This is very helpful! The exact code you send me works, but it's not exactly what I want. I'm not running a timer exactly, but just running code that computes the updated points in an optimization loop (this time taken is symbolized by sleep(100) in my code above). Is there any way to keep running the code and update the results through a function (say update_points() ) while maintaining interactivity? My code keeps running if I don't do Also, I'm getting this error on interrupt when running your code:
I'm forced to restart the kernel after that. It's not a big deal, but I wonder if it's a replicable issue. |
Uhm.. does it also crash in the latest dev?
|
It works with the latest dev. It's also significantly faster! Thanks. I still have the problem of keeping my optimization code running while maintaining interactivity though, something like this
Is there a way to do what I'm describing with Vedo, or is this impossible? |
That is not possible i'm afraid (but I think it's a general limitation of the upstream vtk). |
(1) There might be a bug with
(2) I'm not having any luck with modifying
(3) Another problem I'm finding might be related to #908. I remember why I deliberately used an old version of vedo. I used to be able to use 'vedo.Points(pts, c=colors, r=5)' with
This is the error
I don't know if removing this feature was intentional. The documentation still says "For very large point clouds a list of colors and alpha can be assigned to each point in the form c=[(R,G,B,A), ... ] where 0<=R<256, ... 0<=A<256." so I assume it's a bug. It's a very useful feature so I hope it can be kept! |
Thanks for reporting all this and for your patience, I will have a look at all this over the weekend! |
Hi @marcomusy, have you been able to look into (3) above? I have confirmed that vedo-2023.4.4 has the correct behavior and vedo-2024.5.1+dev04 does not. |
Oh, I see what I had wrong. I can directly do object.c = [(R,G,B,A), ... ], and not object.c([(R,G,B,A), ... ]). This aspect is resolved. This should be resolved now. Thank you! |
I am trying to create a multi-panel interactive plot in Jupyter Lab in Ubuntu 20. The code visualizes multiple meshes and points in the space on each panel. The goal is to be able to visualize and interact with all the panels while the points update, i.e. rotate them at the same time.
I tried running it with the vtk default_backend, but I can't interact with it, and I cannot close it, which is problematic. That said, it works at displaying the changing points, and I can interact with it after all updates are done, but I can't interact during the updates.
Then I update the points multiple times using
I thought the k3d default_backend would help me circumvent the window-not-closing issue by having the visualization in the notebook output, but I'm getting the following error when running vp1.add(points, at=i):
I believe this is because the k3d backend does not support multi-panel visualization. The Vedo documentation says that Vedo can run on other backends like ipyvtklink and trame. Does anybody know if this will work for me?
Update: I conda installed ipyvtklink and set the backend to ipyvtk and no visualization showed and also no error. Still can't figure it out.
All in all, I'm unsure how to get this to work. Again, my goal is to be able to visualize N meshes and M changing points in their panels while interacting with them during the changes. Would also be great if I could close the window by clicking the x of the vtkplotter. Any help or pointers would be appreciated!
The text was updated successfully, but these errors were encountered: