I need to animate a figure with subplot. For that, I use this official example :
http://matplotlib.org/examples/animation/subplots.html
Now, I would like have access to this feature through a function. So, I replace the 3 last lines of this official example
ani = SubplotAnimation()
# ani.save('test_sub.mp4')
plt.show()
by :
def MyDraw():
ani = SubplotAnimation()
plt.show()
MyDraw()
The official example works perfectly but calling this through the function MyDraw does not work. It produces no error message, but the figure show each axes with no curve inside...
If someone could help me. Thanks.
through another function? Can you provide its code?