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

How to create gif animation? #36

Closed
HarukiUchito opened this issue Mar 30, 2019 · 2 comments
Closed

How to create gif animation? #36

HarukiUchito opened this issue Mar 30, 2019 · 2 comments

Comments

@HarukiUchito
Copy link

Hello, I'm trying to create gif animation by the code like following.
But only last frame was recorded in "movie.gif".
Is this the wrong usage of functions or the limitation of the current package?

let mut fg = Figure::new();
fg.set_terminal("gif animate optimize delay 2 size 480,360", "movie.gif");
for _ in 0..10 {
    fg.clear_axes();
    // calculate x, y
    fg.axes2d().lines_points(&x,&y);
    fg.show();
}
@SiegeLord
Copy link
Owner

Thanks for reporting this, it was not possible to do this before but I added a new function to enable this in version 0.0.30. See the https://github.com/SiegeLord/RustGnuplot/blob/master/examples/gif.rs example for how to do it.

@HarukiUchito
Copy link
Author

Thank you!

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

No branches or pull requests

2 participants