I am trying to create an animation in matplotlib that updates three artists including imshow, outline and text. Using FuncAnimation, I can update the text and image components, but could not update the outline. In particular, I tried this as my callback:
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]
This code does not throw an exception, but also does not update the outline lines. Interestingly, it is just a question that I do not know the correct setter method if there is more of it. Can someone tell me if this is possible?
Thanks Eli
source
share