且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

matplotlib QT imshow动画

更新时间:2023-10-24 23:05:10

我要看看这个,但它看起来像使用Qt后端调用:

  QApplication.ProcessEvents()

更新imshow情节。

Does imshow animation work with the qt-backend? The following works fine in non-qt but does not animate using qt - just shows the last frame:

img = standard_normal((40,40))
image =imshow(img,interpolation='nearest',animated=True)
for k in range(1,10): 
     img = standard_normal((40,40)) 
     image.set_data(img) 
     draw()

I'll take a look at that but it looks like for using the qt backend the call to:

QApplication.ProcessEvents()

updates the imshow plot.