QCustomPlot Discussion and Comments

Equivalent to xAxis/yAxis->setAutoTicks(true)Return to overview

Hello,

is there a equivalent to xAxis/yAxis->setAutoTicks(true) in QCP 2.0 ? I used it in QCP 1.3 to clear axis and rebuild a new uniformly distributed numerical axis ticker.

Thanks.

Got it, I just built a new default ticker:

QSharedPointer<QCPAxisTicker> tickerX(new QCPAxisTicker());
plot->xAxis->setTicker(tickerX);

seems like a huge waste of processing time and memory when it should automatically redo the axis every time you call replot.

Because change is done upon user request (so quite infrequently). Each time, axis name/scale/tickertype can change depending on user input parameters.