How to "exit" or close gnuplot? #251
-
Beta Was this translation helpful? Give feedback.
Answered by
alandefreitas
Mar 30, 2022
Replies: 2 comments 4 replies
-
If you call You can also just save the figure instead of manually taking a screenshot. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Don't call Just create the figure outside the loop and use the loop to update the figure: auto fig = matplot::figure(true);
for (int i=0; i<1000; i++)
{
fig->position({ 560, 1, 0, 0 });
fig->size(1920, 980);
fig->plot( x, y, x, z);
fig->save("temp/image.jpg");
// figures destroyed with RAII when the handle gets invalidated
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alandefreitas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't call
auto fig5 = matplot::figure(true);
inside the loop. By creating a new figure, you're asking the backend to launch another instance of gnuplot to plot that chart.Just create the figure outside the loop and use the loop to update the figure: