1

I am loading a video and reading each frame.

I want to update the figure with each frame in a for loop

plt.figure()
for frame in frames:
    plt.imshow(frame)
    plt.show()
    time.sleep(0.1)

I am running the above in a notebook with %matplotlib notebook magic.

Edit: The issue is that it doesn't update the figure (or plot at all in the loop) only plots the last frame at the end of the loop.

0

0

Browse other questions tagged or ask your own question.