As soon as you change the transformation ( scale ranges/canvas size ) or you need to erase something from the plot canvas you have to repaint it. What repainting means might depend.
But before you continue with your code have a look at the refreshtest example. Its purpose is to show what refresh rates are possible on a particular hardware and what parameters have which impact on the performance. F.e. on my box ( an Atom board on X11 ) I can see about 70 fps for a plot with a curve of 20000 points.
Another example you could check is the oscilloscope. Because it doesn't update the scales for every point it can paint incrementally on top of the existing scene and you get extremely high update rates.
Uwe
Bookmarks