QCustomPlot Discussion and Comments

Logarithmic axis tickerReturn to overview

Dear all,
Thank you for this amazing widget you develop. I use it quite often and I am always happy with it.

I have a question regarding the logarithmic axis in the plot.
When I use it, only decades are displayed on my graph (1, 10 , 100, etc...).
Is there a simple way that when you zoom in, you can display more values just like it is done with standard axis?

Many thanks.


Have a look at one of the example provided with the library : https://www.qcustomplot.com/index.php/demos/logarithmicdemo

You should find what you need, especially in the QCPAxisTickerLog class


Thank you lesauxvi.
I have found this example and I tested it.
Unfortunately, it seems when I zoom on the graph, the tickers value (like 2.10^2,3.10^3 ..etc) are not displayed between two decades.
Is it not the case for you?


yes I have the same problem. Should have checked before posting, sorry. I just searched inside the doc and may have find a place to look at. May be the QCPAxisTicker::createLabelVector method of the QCPAxisTickerLog class can solve your problem. I have not tested it though but it could be a good start.

Let us know if this solves your problem and do not hesitate to post one working example if you are satisfied with your solution!


I will try lesauxvi, thanks for your precious help.
Do you have an example on how to use it?
I am quite new in QCustomPlot and C++ in general

Unfortunately, I have not tried anything yet. Sorry. I'll try to find the time the propose one minimum working example.