I would like to know how to print_figure or savefig with animated elements. The only thing I get is the axis but no animated objects.
The idea is that I’ve written a program embedding matplotlib in wx and then I create plots and animations in a similar way as in the example animation_blit_wx.py.
In that way, I do something like:
lines, = self.axes.plot(x,y,animated=True)
background = self.canvas.copy_from_bbox(self.figure.bbox)
and afterwards, I create some animation by updating the ydata in the following way:
and now I would like to save the picture:
but doing so does not save the lines.
The only workaround I’ve
found is to set animated=false for all the objects, print the figure and then set animated=true again.