-
I have been using vedo for animating moving graphs for some time now. However, I finding that different computers causes Plotter.show() to behave differently. For one computer, when I use Plotter.show(), the entire renderer is rerendered. So if I originally have 3 points, then show 2 points, the original 3 points will disappear. Therefore to make the behaviour more predictable, I am planning to use Plotter.clear() to remove all the actors. However, after using clear, all my buttons and axes are gone and I cannot add them back in. I.e here is an example:
I want to reuse the same plotter and be able to clear it content and show new content. But the trouble is that my buttons and axes simply can't return to the same plotter. I was hoping someone could tell me what they're doing to create animations in vedo or whether i'm using Plotter.clear() incorrectly. Would appreciate any insights, thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Thanks for reporting this, can you tell me on which operating system you observe these different behaviours? You made a good point that the from vedo import *
vedo_plt = Plotter(interactive=False)
# Create points
x_pt = Point([1, 0, 0], c='o5', r=20)
y_pt = Point([0, 1, 0], c='g5', r=20)
z_pt = Point([0, 0, 1], c='r5', r=20)
# operation + creates an Assembly object, but you can also
# explicitly give the bounds you wish with xrange=... etc
axes = Axes( x_pt + y_pt + z_pt )
# Show 3 points (at this stage, axes will be shown)
vedo_plt.show(x_pt, y_pt, z_pt, axes, "3 Points").interactive()
# Perform the clear
vedo_plt.clear()
# Show one point with the same axes
vedo_plt.show(x_pt, axes, "1 Point")
vedo_plt.interactive() In general, once the scene is rendered with |
Beta Was this translation helpful? Give feedback.
Thanks for reporting this, can you tell me on which operating system you observe these different behaviours?
What vedo/vtk versions are you using? (type
vedo --info
)You made a good point that the
clear()
method should not get rid of the buttons! I'll try to see if I can fix that.In any case it should not be necessary to use clear. In this example you can create the
Axes
manually and treat them like any other vedo object in the scene.