QCustomPlot Discussion and Comments

How to avoid replotting of specified layer?Return to overview

Hi,
I'm trying to avoid replotting of layer which contains a lot of elements that does not need any update in runtime. Do you have any ideas?

Thanks,

you would want to use QCPLayer::replot.
https://www.qcustomplot.com/documentation/classQCPLayer.html#adefd53b6db02f470151c416f42e37180

Hi
I just made some tests with my real time application.
I have some decorative items on a custom layer above "background" and didnt want to redraw these items each period.
All the layers modes were changed to lmBuffered and instead of calling QCP::replot, i just call QCPLayer::replot for the layers "grid", "main" and "axis" (didnt need legend ans overlay).
Under some circumstances i had to call a full replot and let also the default behavior on resizeEvent.
By doing that, the custom replot fonction is twice faster.
But do you know if there are some serious drawbacks ?
Thanks