QCustomPlot Discussion and Comments

display QCPAxisTicker through coutReturn to overview

for debugging purposes I would like to do something like

  qDebug() << "DEBUG -  yAxis2 ticker  <" <<  (ui->plot->yAxis2->ticker()) << ">";  
  qDebug() << "DEBUG -  yAxis2 Tick values: <" <<  ui->plot->yAxis2->tickVector() << ">";
  qDebug() << "DEBUG -  yAxis2 Tick labels: <" <<  ui->plot->yAxis2->tickVectorLabels() << ">"; 

but while for an yAxis2 there's a tickVector() and a tickVectorLabels() method, I don't see how to print to plain text a QCPAxisTickerFixed for instance. The QCPAxisTicker classes have no tickVector() and tickVectorLabels() methods.
How to print in plain text such a QCPAxisTicker?

QCPAxisTicker::generate is what you are looking for i believe

this function seems to generate ticks and labels for a given range, it doesn't return what is already stored: "The ticks are generated for the specified range. " so I have to give again a range. Moreover it requires a lot of parameters:

    const QCPRange &  	range,
		const QLocale &  	locale,
		QChar  	formatChar,
		int  	precision,
		QVector< double > &  	ticks,
		QVector< double > *  	subTicks,
		QVector< QString > *  	tickLabels

I guess the last three are output parameters so I have to set them up.
But my goal is to extract and print what is already associated to an axis, not to generate new labels/ticks

But then you can just use axis->tickVector() and axis->tickVectorLabels
They provide the currently active ticks and labels, no matter from which ticker they come (if the ticker is installed in the axis, via setTicker)

now that's interesting. I did exactly that: I installed a custom ticker to an axis, it gets displayed but if I print the content through axis->tickVector() and axis->tickVectorLabels(), the old content is still there. this is why I wanted to debug it.
Moreover, when performing a pan/zoom, the displayed ticker gets replaced by the previous ticker, which is basically consistent with the qdebug() output.
It looks like that through setTicker the custom ticker gets displayed but not stored. Could it be a bug? or what could I possibly do wrong?

Regards