How Can I Remove Points From A Matplotlib Plot Before Plotting A New One?
I am trying to plot a point whose position is controlled by a slider. However, each time the slider is moved a new point is plotted without deleting the old one. How do you remove
Solution 1:
You can change the properties of point
:
def on_change(val):
point.set_offsets([x[int(val) / 1], y[int(val) / 1]])
point.set_3d_properties([z[int(val) / 1]], "z")
fig.canvas.draw()
Post a Comment for "How Can I Remove Points From A Matplotlib Plot Before Plotting A New One?"