Consider this code:
int main(int argc, char *argv[]) { QApplication app(argc, argv); QCustomPlot* const plot = new QCustomPlot; plot->show(); QTimer plotter; QObject::connect(&plotter, &QTimer::timeout, plot, [plot] { plot->replot(QCustomPlot::rpQueuedReplot); std::cerr << plot->replotTime() << '\r'; }); plotter.start(16); app.exec(); }
When I maximize the plot(1920x1080) the QCustomPlot::replot
takes about 6ms to replot. And it's come up to 100ms when I add about 2k(per graph, I want 6 graphs in the plot) points.
How could I fix it?