QCustomPlot Discussion and Comments

label positionReturn to overview

I set label:

customPlot->xAxis->setLabel("aaaaa");

But how can I set position of label. Lable was shown in middle of xAxis, yAxis. Can I move it?

Currently there's no parameter on QCPAxis to control the sideways-position of the label (the distance from the axis can be set via setLabelPadding). However, you can either generate your own label with QCPItemText (and hide the normal axis label), or subclass QCPAxis to display the label differently.

I add new y axis at right of plot

plot->axisRect(0)->addAxis(QCPAxis::atRight);

I want to add label top of this y axis. But y axis position is changeable according to its range. Is there any function to get position of y axis.