-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Gif output on Windows #385
Comments
Does The fact that it is an OSError is rather odd... |
oups! it first fails on
|
for
, i get:
|
Thanks. I'll test this with Python 3 and see if I can reproduce it. |
After fixing the zip issue, I can say that it works on Mac OS. I can also test on Linux but it is a bit more effort for me to test on windows. The error to me looks like it might be a matplotlib issue when outputting to gif (requires imagemagick and therefore may not be a good example in the end). Could you try this? import numpy as np
from matplotlib import pyplot as plt
from matplotlib import animation
def animate(n):
plt.cla()
plt.plot(np.random.rand(10,2))
plt.ylim(0,1)
fig = plt.figure()
anim = animation.FuncAnimation(fig, animate, frames=30)
anim.save('test.gif', writer='imagemagick', fps=4) This doesn't seem to output an animated gif (an issue I notice in Showcase as well and will need to investigate) but it should at least test if ImageMagick works on your system. |
I think I don't have imagemagick |
It's not listed on anaconda package index either: http://docs.continuum.io/anaconda/pkg-docs Isn't there another way, nowodays, to achieve the required functionality ? |
Yes, ImageMagick won't be installed on windows by default (and probably not on Mac OS either). At a minimum, in the Showcase tutorial, we should mention that ImageMagick is required for gif support, probably after the line: %output holomap='gif' Maybe we could even link to information on how to get it installed on those platforms. That said, the gif doesn't seem to animate on Mac OS which is also a worry... |
I guess there is a more modern way today... searching.I see:
|
ImageMagick normally works pretty well and this is what matplotlib has supported so far. I've added a note about ImageMagick to the Showcase tutorial in commit 66d6c30. Perhaps you could follow the link mentioned there? |
the download size is 40 Mo on 64bit windows... it's far too big for me. could the recent Pillow 3.0 work be used (as an alternative) ? http://stackoverflow.com/questions/24688802/saving-an-animated-gif-in-pillow |
I think Pillow would be a reasonable option instead of ImageMagick. Sadly, I can't see how to make the example in the stackoverflow post work as I can't find the I think we would have to think very carefully about including this. Pillow is nicer than ImageMagick as it is an easily installed Python library (and smaller as you point out). That said, this is something matplotlib should be concerned with and something their animation module should support. HoloViews could support making gifs with Pillow as a fallback if matplotlib fails but only if very little code is needed to make it work... |
I've searched again and found the gifmaker script. There isn't that much code in there but I would still be hesitant including it in HoloViews. @philippjfr What do you think? I would prefer using Pillow but I don't want us to be maintaining code that really matplotlib should be handling for us. I might consider this if it also addresses the fact that the gifs don't seem to be animating properly on MacOS right now... |
ok, It would seems indeed better spent effort that matplotlib supports it directly. |
There are also quite a few FIXME comments in the script I linked to, also making me wary. @stonebig Perhaps you could use the gifmaker script yourself? I think we could quickly come up with an example that lets you make a gif from frames rendered with HoloViews... |
I'm just discovering the possibility of PIL solution with you. python-pillow/Pillow#1525 (comment) Maybe it's a little to early (yet promising) |
Pillow |
Great! Good to see that the matplotlib developers are receptive to the idea of using PIL/Pillow. ImageMagick is fine on Linux but not such a great dependency on other platforms... |
WarrenWeckesser has added a proof of concept gist today. |
@stonebig Have you heard any news about having imagemagick free GIF output? I still think it would be a nice thing to have... |
Renaming this issue since Showcase will be removed but gif output is still an issue on some systems. |
Sadly the referenced matplotlib issue hasn't been merged, so I assume depending on imagemagick is still the only option. |
Looking hopeful that a Pillow based animation writer will land in matplotlib soon: matplotlib/matplotlib#10240 |
Great! Let's keep an eye on that. |
Using matplotlib 2.2.0 it is now possible to get gif output by installing pillow |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I get this, with no clue of the problem, under Windows 7 / Python 3.4.4. / Notebook 4.0.6
The text was updated successfully, but these errors were encountered: