4

I have a list of data that I want to be animated on the plot, I'm currently using:

graph1=gdots(pos = pvalues)    #pvalues is list of points

while t <= t_max:
    rate(200)
    ...    #pvalues is updated to new contain the new points
    graph1=gdots(pos = pvalues)

What happens here is the old points remain on the plot, so lines are traced out when I want the points to just move. I've tried deleting the graph, making it invisible, but none of it works.

graph1.visible = False
del graph1

Including the above makes no noticeable difference to the display. I've searched a lot about this, but the VPython documentation seems to be annoyingly incomplete.

1 Answers1

0

I realise this is a very old question, however I had the same issue with vpython 7. For me, graph1.delete() removed the associated data points from the graph, and rescaled the axes based on the remaining data (if any). I haven't yet found a way to remove the graph axes themselves (i.e. delete the figure).

davidA
  • 12,528
  • 9
  • 64
  • 96