From: Jens N. <jen...@gm...> - 2012-10-31 16:12:26
|
I think Eric idea is a good solution. This is just to point out that I did something similar with kw args to savefig in the image comparison decorator for tests. See the changes in decorators.py in this pull request https://github.com/matplotlib/matplotlib/pull/1420 . Seems to work fine. Greetings, Jens On Wed, Oct 31, 2012 at 4:22 PM, Eric Firing <ef...@ha...> wrote: > On 2012/10/31 2:04 AM, Maximilian Albert wrote: > > [I sent this email a few weeks ago already, but I wasn't subscribed to > > matplotlib-devel at the time and it seems that the message was never > > approved by the moderator. So here comes my second attempt. :)] > > > > Hi all, > > > > this is my first post to this mailing list, so let me take the > > opportunity to thank everyone involved for an amazing piece of > > software and all the hard work you guys put into it! It is very much > > appreciated indeed. > > > > I have a quick question/suggestion regarding the save() method in the > > matplotlib.animation.Animation class. I recently produced an animation > > in which I needed to set tight bounding boxes when saving the > > individual frames. Obviously savefig() supports this, but there is no > > way to pass this information to the Animation.save() method. Would it > > make sense to let Animation.save() accept additional keyword arguments > > which are simply passed on to savefig() in each step of the animation > > loop? Or am I overlooking potential drawbacks of this approach? A > > simple patch with this idea is attached. Feel free to use it as is or > > to modify at will if you think this is useful. > > I don't have time to look at this, so I will toss out one idea for > consideration: > > If there is any chance that other sorts of kwarg collections might be > needed, or simply to improve readability and explicitness, instead of > passing on **kwargs, you might make a new kwarg, "savefigkw", which > would take a dictionary that would then be used via "savefig(..., > **savefigkw". > > Eric > > > > > > Many thanks and kind regards, > > Max > > > > > > > > > ------------------------------------------------------------------------------ > > Everyone hates slow websites. So do we. > > Make your web apps faster with AppDynamics > > Download AppDynamics Lite for free today: > > http://p.sf.net/sfu/appdyn_sfd2d_oct > > > > > > > > _______________________________________________ > > Matplotlib-devel mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > |