Stop making window flicker with draw() #237
Unanswered
tmiethlinger
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I don't it's possible to change that with gnuplot + pipes. It's not really meant for high FPS. This will probably only be fixed in matplot++ v2. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I really like the library and I would like to use it for some sort of simple animation.
The following code works, but unfortunately the window "flickers" whenever the window updates / I call draw. I hope it is clear, what I mean. Is it possible to somehow fix that?
#include
#include <matplot/matplot.h>
#include <unistd.h>
inline void mysleep(unsigned millis)
{
usleep(millis * 1000);
}
int main()
{
using namespace matplot;
auto f = figure(true);
auto ax = gca();
std::vector x = linspace(0, 2pi);
axis({0, 2pi, -1, 1});
std::vector y = transform(x, [](auto x) { return sin(x); });
return 0;
}
Thanks a lot!
Thomas
Beta Was this translation helpful? Give feedback.
All reactions