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

save visualization as gif #29

Merged
merged 3 commits into from
May 11, 2019
Merged

Conversation

mavroudisv
Copy link
Contributor

Just a simple modification that let's you save your visualizations as a gif.

@maximecb
Copy link
Contributor

maximecb commented May 2, 2019

You should put that import in a try block or import lazily. Otherwise this could break the script if this new dependency fails to install, which is almost certainly going to happen on some systems.

@mavroudisv
Copy link
Contributor Author

Hi Maxime,
thanks for the response. :)

Perhaps something like:

if args.gif is not None:
   from array2gif import write_gif
   frames = []

would do?

@maximecb
Copy link
Contributor

maximecb commented May 2, 2019

Yes. Just make sure to test that it works.

@mavroudisv
Copy link
Contributor Author

Thanks for the suggestion. I ended up using the code above.

I also thought of just ignoring the gif option if array2gif is not installed, but I think an exception is more informative for the user (i.e., to know why the gif was not generated).

@lcswillems lcswillems merged commit 02a39a0 into lcswillems:master May 11, 2019
@lcswillems
Copy link
Owner

@mavroudisv Thanks a lot for your PR!!

@mavroudisv
Copy link
Contributor Author

Thank you guys for the awesome project(s). Happy to have helped a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants