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.
From: John Hunter <jdh2358@gm...> - 2009-01-05 15:38:30
On Mon, Jan 5, 2009 at 9:30 AM, <zndlf-web@...> wrote:
> 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.
Yes, that is the way to do it -- we could add some logic to savefig to do this.
Get latest updates about Open Source Projects, Conferences and News.