11-27-2023 02:51 AM
Hello experts,
does anyone know how to solve this issue?
I have a graph where I display values in real-time, but when this text moves on the graph, it often flickers, which is not very pleasant to the eyes.
Do you know why it does this?
Is there a way to resolve it so that this text doesn't flicker?
Thank you for your response; I'm attaching the source code here as well.
Solved! Go to Solution.
11-27-2023 04:41 AM - edited 11-27-2023 04:43 AM
I suppose the code you posted is an abstract from your actual application.
I made a simple test app to check graph behavior and i see no flickering regardless the options set in the graph and/or in the code, so the flickering is probably caused by some other call in your code.
BTW: it is not needed to recreate the metafont on every timer call: you can simply create the one you need at program start and use it in your subsequent calls to PlotText ().
I am attaching the code to this message: feel free to test, modify and comment.
11-27-2023 05:19 AM
Hi Roberto,
thank you for your reply and making the program, I found that it affects the timer and I need it set to 0.01 and your test program has it set to 0.05 If you set it to 0.01 you will see text flicker.
Thanks for the advice
11-27-2023 05:57 AM
Rather than flickering I see a ghost text immediately next the actual text drawn, but it could very well be a defect in my vision!
I see no reasonable way of reducing side effects at so fast a rate, but I wonder if you really need such rate, considering that not all people can appreciate 100 Hz variations. Consider also that your 100 Hz phenomenon falls beyond the capacity of a great numbers of monitors which have a 60 Hz refresh ratio.
That being said, you could reduce the flickering if you plot a point every two, thus halving the update rate, with an effect that won't probably be appreciated by users.
11-27-2023 07:00 AM
Yes, you are right, it is true that somewhere the flickering is not so frequent, precisely because of the higher frequency of the monitor.
So thank you for the advice, this will be enough for me and I will adjust the timer to a different speed.
Have a nice day