QCustomPlot Discussion and Comments

Vertical and horizontal grid linesReturn to overview

Hi all,

I need to create grid that shall have solid vertical and horizontal lines for each 10mm and dotted vertical and horizontal lines for each 2mm. Can someone give me an example of this grid?

Thank you,


To me it is not clear what you want. What sense do mm make on a screen? I think you will need to check the dpi yourself and create your own QCPGrid. What have you tried?

You may also need to create your own QCPAxis for this. If all else fails, just make your own QCPLayerable and draw on the plot as you like.

Well I have an app that is suppose to work on 24" fullHD screen. I have used QSharedPointer to create fixedTicker for xAxis and give it a value of 15 (empirical value).

xfixedTicker->setTicker(15.0) will create dotted lines on xAxis every 2mm. I did the same for yAxis but the ticker value is now (0.25). I am aware that this is not the best way because I am fixing values to particular monitor and resolution.

As for the 10mm solid lines I was thinking of using subTick.

Is there a better solution for this?