matplotlib QT imshow动画 [英] matplotlib qt imshow animate

查看:279
本文介绍了matplotlib QT imshow动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否与QT-后端imshow动画作品?以下工作正常非调质,但不使用动画QT - 只是显示的最后一帧:

  IMG = standard_normal((40,40))
图像= imshow(IMG,插值='最近',动画= TRUE)
对于k在范围(1,10):
     IMG = standard_normal((40,40))
     image.set_data(IMG)
     画()


解决方案

我要看看这个,但它看起来像使用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.

这篇关于matplotlib QT imshow动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆