QCustomPlot Discussion and Comments

QCPBars and QCPGraph with second Axis Yaxis2Return to overview

Hello together,

I am feeding a QCustomPlot Widget with QCPBars and then want to draw a QCPGraph on top of it.
I want that the values of the QCPGraph use the second y-axis, so I create it like that:

(where ui.CST points to the QCustomplot widget)
However: the Graph Data is still plotted using the primary Yaxis.

Can anyon give me a hint to this?


imo that code should work.

Perhaps take a look at my independent axis example on GitHub:


Hello again,

found my mistake:
I simply forgot a ui.CST->yAxis2->setVisible(true)
Thougt it would get visible automatically as soon as it is used.