QCustomPlot Discussion and Comments

Major Tick "Guide" Lines in Plot AreaReturn to overview

I've been looking at the demos and messing around with them a bit but I have been unable to figure out how I can control the dotted "guide" lines that are in the plot area that correspond to the major axis ticks. As an exercise I've been trying to take one of the examples and completely convert it over from left axis to right axis use and would like these "guides" to track the right axis major ticks. They are always tracking the major ticks on the invisible left axis since I have no idea how to change them. Just probably haven't looked deep enough into the documentation to find this. Any insight would be helpful. Thanks.

They are attached to ticks so if you want to control it, you have to control Ticks. by QCPAxis::setTickStep() you can control number of them and by getting grid() method of every axis, you can have all controls over that grid (visibility, pen, ...).

Just for clarity: The grid lines belong to axes. So what you observe is that the grid lines of the left axis are still visible, while the grid lines for the right axis are invisible. This is the initial state. You can change it like this:


For more details, please see the QCPGrid and QCPAxis documentation.

I knew it had to be something simple like that. Thanks.