Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed MPLRenderer anim output regression #2454

Merged
merged 5 commits into from
Mar 19, 2018
Merged

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Mar 16, 2018

During the update to the renderer code to make it work in JupyterLab a regression was introduced to rendering animation output using matplotlib (e.g. gif, mp4 and webm output). This PR fixes the regression.

Additionally this switches to the pillow animation writer for matplotlib>=2.2.0, which provides an easy way to generate gifs on windows.

@philippjfr philippjfr added type: bug Something isn't correct or isn't working tag: backend: mpl labels Mar 16, 2018
@philippjfr
Copy link
Member Author

Ready to merge.

"Note that GIF support requires [ImageMagick](http://www.imagemagick.org) which is installed by default on many Linux installations and may be installed on OSX using [brew](http://brew.sh) . For more information on how to install ImageMagick (including Windows instructions) see the [installation page](http://www.imagemagick.org/script/binary-releases.php)."
"### GIF\n",
"\n",
"Note that GIF support requires [ImageMagick](http://www.imagemagick.org) which is installed by default on many Linux installations and may be installed on OSX using [brew](http://brew.sh) . For more information on how to install ImageMagick (including Windows instructions) see the [installation page](http://www.imagemagick.org/script/binary-releases.php).\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am tempted to deprecate the code path that uses imagemagick entirely. Installing imagemagick on systems where it isn't already available is a pain.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

matplotlib 2.2.0 with pillow support is only a few weeks old, so strong -1 from me on deprecating that code path now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused; this PR says that it's using pillow rather than imagemagick, but the change above makes it sound like imagemagick is still needed? I too vote for never using imagemagick if we don't need to, as it's a non-python dependency that's surprising to people and hard to manage.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to make the documentation clearer on ImageMagick being required for earlier versions of matplotlib and pillow being fine for recent versions, but due to the matplotlib release being so recent I still don't think it should be deprecated.

Copy link
Contributor

@jlstevens jlstevens Mar 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be ok to tell people to upgrade their matplotlib and install pillow if they want gif support. On the plus side, the actual GIF support is handled by matplotlib so it doesn't really change how much code we have to maintain.

I'm happy to go with Philipp's suggestion as long an issue is filed to remove imagemagick support (and references from the docs) in 1.11.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the plus side, the actual GIF support is handled by matplotlib so it doesn't really change how much code we have to maintain.

We do declare which backend it uses for rendering GIFs, maybe we can find a way to fall back to other backends cleanly though.

I'm happy to go with Philipp's suggestion as long an issue is filed to remove imagemagick support (and references from the docs) in 1.11.

That seems sensible, but deprecating something in favor of a replacement that's only been around 2-3 weeks just seems too quick.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

@jlstevens
Copy link
Contributor

I'll merge now with the understanding that Philipp will file an issue to remove the references to imagemagick when the time is right (I agree it is probably too early to do that now).

@jlstevens jlstevens merged commit 10b8185 into master Mar 19, 2018
@philippjfr philippjfr deleted the fix_mpl_anim_render branch March 22, 2018 15:01
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tag: backend: mpl type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants