QCustomPlot Discussion and Comments

Dual axis plotReturn to overview

Hi, I want to plot DATE (first x axis) vs VALUE1 (y axis). On the same plot I want to display another graph - VALUE 2 (second x axis) vs VALUE1 (same y axis).

Is it possible with qcustomplot?

yes. there are two sets of axis on each qcustomplot. when you create the graph, you pass in a pointer to an axis. you can use the two different sets of axis.

pretty sure there is an example for this.

Thanks for reply. I can't figure out how to plot what I want (I know how to plot two graphs with different x axis, but I want something a little different - please see picture http://gaminn.sweb.cz/plot.png ).

that's exactly what the two axis thing is for in qcustomplot though. you need 2 xaxis and 1 y axis.

in the picture, it looks like you want 1 QCPGraph with the constructor QCPGraph(xAxis,yAxis), and the second QCPGraph with constructor QCPGraph(yAxis,xAxis2).