Force grid to have fixed number of lines and the same with number of tick labels
I have dynamically changing chart whose both x and y scales are dynamic. I attached grid item to the plot but i don't like the way it is changing along with axis scaling. For instance When I have X axis' interval from 0 to 1500 points i see only 3 vertical lines on grid and the same with tick labels.
I would like to have always dense amount of grid lines, most preferably fixed on 10 lines, also number of tick labels could be fixed. Tried to enable minor tick but it only give me some amount of additional marks on scale. :confused:
Re: Force grid to have fixed number of lines and the same with number of tick labels
Quote:
Originally Posted by
code_err
I would like to have always dense amount of grid lines, most preferably fixed on 10 lines, also number of tick labels could be fixed. Tried to enable minor tick but it only give me some amount of additional marks on scale.
Then you did something wrong - when you enable grid lines for the minor ticks ( QwtPlotGrid::enableXMin()/!enableYMin() ) you will see grid lines for every minor tick.
But modifying attributes of the grid has no effect on number and positions of the ticks. This can be done modifying QwtPlot::setAxisMaxMinor and QwtPlot::setAxisMaxMajor - and of course by setting attributes for the corresponding scale engine.
Uwe