Matplotlib animate over an image

后端 未结 1 1569
温柔的废话
温柔的废话 2021-01-15 11:19

I\'m trying to animate a bunch of constantly updating points over an image (imagine making a plotted dot move diagonally across some image). I\'ve looked at the animate exa

1条回答
  •  难免孤独
    2021-01-15 11:43

    You do not need to clear the figure between every frame

    #initial data 
    ln, = ax.plot(x,y)
    #...some loop code
        ln.set_xdata(new_x)
        ln.set_ydata(new_y)
    

    Can you show some code of what you have tried, it will make it easier to give a more concrete answer.

    Also see: using matplotlib's quiver in a loop efficiently, Visualization of 3D-numpy-array frame by frame

    0 讨论(0)
提交回复
热议问题