I have a set of points to plot and their coordinates are stored in
QVector<double> x(200), y(200);
I'd like to connect them with some smooth curve, any, say, splines. Or a bigger array of points between knots would also suffice. My try is
customPlot->addGraph();
customPlot->graph(0)->setData(x, y);
customPlot->graph(0)->setPen(QPen(Qt::blue));
customPlot->xAxis->setLabel("Index");
customPlot->yAxis->setLabel("Amplitude");
customPlot->xAxis->setRange(0, 200);
customPlot->yAxis->setRange(-3, 3);
I tried QPainterPath class, but it didn't work. Please, help me out.
UPD: I'm now looking through QEasingCurve class, these functions might help, but authors provide no examples and I don't know how to use them.