Hello!
I'm trying to plot a graph but dots at plot out of order.
My test data:
QVector<double> x, y; x.push_front(-16.10013); x.push_front(-14.39783); x.push_front(-12.71163); x.push_front(-11.04631); x.push_front(-9.40907); x.push_front(-7.81130); x.push_front(-6.27243); x.push_front(-4.82860); x.push_front(-3.55477); x.push_front(-2.61924); x.push_front(-2.34341); x.push_front(-2.93661); x.push_front(-4.15512); x.push_front(-5.70078); x.push_front(-7.41957); x.push_front(-9.23954); x.push_front(-11.12424); x.push_front(-13.05334); x.push_front(-15.01457); x.push_front(-17.00000); y.push_front(10.56183); y.push_front(9.39987); y.push_front(8.24805); y.push_front(7.10922); y.push_front(5.98764); y.push_front(4.88985); y.push_front(3.82665); y.push_front(2.81718); y.push_front(1.89807); y.push_front(1.14046); y.push_front(0.63955); y.push_front(0.36887); y.push_front(0.18507); y.push_front(0.01866); y.push_front(-0.14649); y.push_front(-0.31344); y.push_front(-0.48253); y.push_front(-0.65351); y.push_front(-0.82609); y.push_front(-1.00000); ui->customPlot->addGraph(); ui->customPlot->graph(0)->setData(x, y); ui->customPlot->xAxis->setLabel("x"); ui->customPlot->yAxis->setLabel("y"); ui->customPlot->rescaleAxes(true); ui->customPlot->replot();
... and nothing makes sense
It can see in figure down
https://ibb.co/rZ2sc1s
I'm plotting it in gnuplot and everything ok.
https://ibb.co/SNBmy6z
My configuration:
QCustomPlot 2 Version: 2.0.1, released on June 25, 2018
Qt5.11
You could help me, please!