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:
pGRAPH=ui.CST_BAR->addGraph(ui.CST->xAxis,ui.CST->yAxis2);

(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?

Thanx,
R.

imo that code should work.

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

https://github.com/mmccullo/qcustomplot-interaction-example

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.

Greetings,

R.