JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
|
Many of the function in JKQTPlotter case an immediate redraw of the widget. Examples are JKQTPlott::setX(), JKQTPlotter::setY(), JKQTPlotter::setAbsoluteX(), JKQTPlotter::setAbsoluteY(), JKQTPlotter::addGraph() ... so if you use a combination of these while setting up your plot, it is possible to cause several (rather expensive) redraws of the plot widget. Therefore you can disable this redrawing, using JKQTPlotter::setPlotUpdateEnabled() and you can explicitly cause a redraw with JKQTPlotter::redrawPlot(). To make this process even easier to use, there is a guard helper class for this: JKQTPlotterUpdateGuard.
Here is a code example:
This code has the same effect as the long version without the guard class shown below: