Is there any way of showing ticks and subticks over zerolines in QCustomPlot? I couldn't find anything in documentation.
How to show ticks and subticks on zerolines in QCustomPlot?
888 views Asked by Adnan At
2
There are 2 answers
0
On
You may have your layers mixed up. Make sure your grid is on a layer below the axis, because the zero line is part of the grid, and the ticks part of the axis. So for example:
axis->setLayer("axes");
axis->grid()->setLayer("grid");
Note that "axes" and "grid" are layers that exist by default. And normally the grid is already placed on the correct layer, so what you are experiencing is probably due to clearing the default setup/plot layout and then creating a new axis rect all on one layer.
I had to create ticks and subticks with QCPItemLine. Here is the code: