QCustomPlot Discussion and Comments

Step beetween two values (on x axis)Return to overview

Hello custom people !
I hope that you are fine :)

I have a little question, i have a graph with 80 000 values approximately and i don't know how to configure the step in my x axis. have a look to the figure 1 below :
figure 1 => https://ibb.co/b5CGqPS

and me i want that :
https://ibb.co/f4st9Vc

is it possible to manage this parameter ?


good day all :)

ps : QCP Version: 2.0.1

I saw on the doc :
https://ibb.co/gF4cCVQ

it's cool but in my code i have this error :

QSharedPointer<QCPAxisTickerText> textTicker(new QCPAxisTickerText);
textTicker->addTicks(ticks, carac[1]);
 ui->customPlot->xAxis->setTicker(textTicker);
textTicker->setTickStep(1.0); // no member named setTickStep 

no member named setTickStep

okay first error :
i need a QSharedPointer<QCPAxisTickerFixed> not QSharedPointer<QCPAxisTickerText>

but how addticks to QCPAxisTickerFixed as to QCPAxisTickerText to get my qstring on axis ?

and in second :
I don't want to see my values every 10 but to change the scale so that a value is spread over a range of 10 for example
https://ibb.co/74XNKdR

good day :)

my first thought would be to subclass QCPAxisTickerFixed and then override the 'getTickLabel' function
https://www.qcustomplot.com/documentation/classQCPAxisTicker.html#a8201eb4aa8be192bf786b126eb5ee089

okay i see, i test I'm testing this tomorrow :)
thanks again :))