PYNQ: PYTHON PRODUCTIVITY

Updating Figure Display

I’ve been trying to get a real-time feed from a USB webcam. What I’m doing now is plotting it and using matplotlib’s imshow feature. Here’s what I’ve got:

plt.ion()
webcam = init_cam() #sets resolution and stuff
fig, ax = plt.subplots(1)
axim = ax.imshow(tFrame) #Show some pre-grabbed image

while True:
    frame = get(webcam) #gets image from webcam
    axim.set_data(frame)
    plt.show(block=False)
    #plt.pause(1)  #I've tried with and without pauses

The plot shows but doesn’t update or redraw. Any help would be appreciated!