What I'm trying to do seems pretty simple, but I have time trying to get it to work. I'm just trying to make an image using imshow and then re-draw it as new data arrives.
I started with this:
fig = figure() ax = plt.axes(xlim=(0,200),ylim=(0,200)) myimg = ax.imshow(zeros((200,200),float))
Then I guess I can call set_data like this to update the image:
myimg.set_data(newdata)
I tried many other things, for example, I called ax.imshow(newdata) instead, or I tried to use figure.show() after set_data() .
python matplotlib imshow
kjgregory
source share