【发布时间】:2012-02-18 00:12:35
【问题描述】:
我正在尝试在 matplotlib 中创建一个动画来更新三个艺术家,包括 imshow、contour 和 text。使用 FuncAnimation 我能够更新文本和图像组件,但无法更新轮廓。具体来说,我尝试将此作为我的回调:
def updatefig(*args):
text_component.set_text(newText())
image_component.set_array(newArrayData())
contour_component.set_array(newArrayData())
return [text_component,image_component,contour_component]
此代码不会引发异常,但也不会更新等高线。我想知道这是否只是我不知道正确的setter方法是否还有更多的问题。谁能告诉我这是否可能?
谢谢, 以利
【问题讨论】:
标签: python animation matplotlib contour