QCustomPlot Discussion and Comments

Points connectionsReturn to overview

Hi, I need to plot 3 points:

x0 = { 0, 10, 3 }
y0 = { 0, 10, 9 }
graph(0)->setData(x0, y0);

Point are properly designed but connections line are wrong.
First point is connected with third and third with second.

Seem that points are ordered on x.

Hi,
The QCPGraph class is for plotting of functions, time series, etc., hence the connection of data points follows the ordering of the x coordinate. If you want to plot parametric curves (where a third coordinate t controls the order), please use the QCPCurve class (see documentation).

Problem solved!!!
Thanks, this library is great :)