Hi all,

quick update on this: I pushed a small change to make the default
argument immutable (thanks to Jens for pointing this out). Just a
couple more questions/comments:

1) Should there be a test for this? I couldn't find any tests for the
Animation class, so I haven't added one. But perhaps I just missed
them.

2) I discovered this morning that my change uncovers/introduces a bug
in the Animation class, so I'd appreciate a bit more input on whether
it should be merged in the current state. Here is an explanation:

My original use case the suggested change was to be able to set tight
bounding boxes when saving animation frames. At the time I simply
saved all frames to separate images and combined them manually using
avconv, which worked fine. I saw that in the development version of
matplotlib there is built-in support for this, so that the video file
is created automatically. Now whenever I change the bounding box, e.g.
by passing something like savefig_kwargs={'bbox_inches': 'tight'} to
Animation.save(), then the output video shows complete garbage
(similar to white noise). I presume this is because the 'frame_size'
property in the MovieWriter class is not aware of the bounding box
changes introduced by savefig_kwargs and thus reports a frame size to
the video converter that is different from the actual size of the
saved frames.

I don't have much time to look into this at the moment, but I just
wanted to point it out. Does anyone have a quick idea for a good fix,
before I get the time to look into the details of how the MovieWriter
class works?

Many thanks,
Max


2012/10/31 Maximilian Albert <maximilian.alb...@gmail.com>:
> Awesome, many thanks for the detailed instructions, as well as for the
> valuable suggestions by Eric and Jens. I have now created a pull
> request containing the proposed change, including the suggested
> modifications:
>
>    https://github.com/matplotlib/matplotlib/pull/1442
>
> Any comments/feedback would be much appreciated.
>
> Best wishes,
> Max
>
>
> 2012/10/31 Damon McDougall <damon.mcdoug...@gmail.com>:
>> On Wed, Oct 31, 2012 at 7:40 AM, Maximilian Albert
>> <maximilian.alb...@gmail.com> wrote:
>>> Hi Damon,
>>>
>>> many thanks for the quick (and positive :)) reply,
>>>
>>>> Sounds like a great idea! Would you feel comfortable having a go at an
>>>> implementation? You can make a pull request out of it. The rest of the
>>>> developers can then deliberate and provide feedback for you.
>>>
>>> I attached a patch to my previous email which contains an
>>> implementation, but perhaps it didn't make it through to the list? But
>>> since I had to clone the git repository anyway to implement it, I'm
>>> happy to make a pull request, too. I'll have to find out how to do
>>> that since I've never done it before, but I guess it can't be too
>>> difficult. Will give it a shot later today.
>>
>> You need to fork the main matplotlib repo, so you have your own copy
>> associated with your github account:
>> https://help.github.com/articles/fork-a-repo
>>
>> Once you've forked it, clone it and create a branch:
>>
>> git clone my-forked-repo-url
>> cd matplotlib
>> git checkout -b my_awesome_new_feature
>> # ... hack hack hack ...
>> git commit -am "Useful commit message here"
>> git push origin my_awesome_new_feature
>>
>> Once you've done that, make a pull request by following the
>> instructions here:
>> https://help.github.com/articles/using-pull-requests
>>
>> Once you've done that, congratulations!
>>
>> Hope this helps.
>> Best wishes,
>> Damon
>>
>> --
>> Damon McDougall
>> http://www.damon-is-a-geek.com
>> B2.39
>> Mathematics Institute
>> University of Warwick
>> Coventry
>> West Midlands
>> CV4 7AL
>> United Kingdom

------------------------------------------------------------------------------
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
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to