QCustomPlot Discussion and Comments

integer subticksReturn to overview

I want that subticks are always located where the values are integer.
On the other hand, is it possible to set subtick count?

It works with using the alternative axis tickers, check this out:

and in general:


I've tried QCPAxisTickerFixed. But it has only "setTickerStep()". What I want is "setSubTickerStep()"

You should subclass QCPAxisTicker, then you can reimplement getSubTickCount (or createSubTickVector for even more control). The documentation of QCPAxisTicker has a section "Creating own axis tickers" which goes into more details.