It takes about 15 minutes to draw more than 100,000 polylines using the sample code as below.

for (int i = 0; i < geBoom1X.size(); ++i) // the type of geBoom1X, geBoom2X, ..., geBoom4X is QVector. { QVector<double> x(6), y(6); x[0] = 1132.0; x[1] = geBoom1X[i]; x[2] = geBoom2X[i]; x[3] = geBoom3X[i]; x[4] = geBoom4X[i]; x[5] = geBucketX[i]; y[0] = 910.0; y[1] = geBoom1Y[i]; y[2] = geBoom2Y[i]; y[3] = geBoom3Y[i]; y[4] = geBoom4Y[i]; y[5] = geBucketY[i]; QCPCurve *curve = new QCPCurve(customPlot->xAxis, customPlot->yAxis); QVector<QCPCurveData> data(6); data[0] = QCPCurveData(0, x[0], y[0]); data[1] = QCPCurveData(1, x[1], y[1]); data[2] = QCPCurveData(2, x[2], y[2]); data[3] = QCPCurveData(3, x[3], y[3]); data[4] = QCPCurveData(4, x[4], y[4]); data[5] = QCPCurveData(5, x[5], y[5]); curve->data()->set(data, true); curve->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssCircle, 10)); }

It takes about 3 seconds if I use QPainter, the sample codes is as follow.

for (int i = 0; i < geBoom1X.size(); ++i) { QVector<double> x(6), y(6); x[0] = 1132.0; x[1] = geBoom1X[i]; x[2] = geBoom2X[i]; x[3] = geBoom3X[i]; x[4] = geBoom4X[i]; x[5] = geBucketX[i]; y[0] = 910.0; y[1] = geBoom1Y[i]; y[2] = geBoom2Y[i]; y[3] = geBoom3Y[i]; y[4] = geBoom4Y[i]; y[5] = geBucketY[i]; QPointF points[] = { QPointF(x[0], y[0]), QPointF(x[1], y[1]), QPointF(x[2], y[2]), QPointF(x[3], y[3]), QPointF(x[4], y[4]), QPointF(x[5], y[5]) }; painter.drawPolyline(points, 6); // the type of painter is QPainter. }

May i ask how to draw thousands of polylines using QCustomPlot?

Thank you very much.