Hello. How I can change frequency of labels drawning on axis? (Example in attachment)
Printable View
Hello. How I can change frequency of labels drawning on axis? (Example in attachment)
I think that you should set your own scalediv with your own ticks. As far as I know visble values of scale are - majorTicks. So majorTick values should be [1,2,3,4...] and minorTicks - [0.5,1.5,...]
I tried this code, but has no effect. What do I wrong?
Code:
QwtScaleDiv scaleDiv; QwtValueList vList; vList<<1<<2<<3<<4<<5; setAxisScaleDiv(xBottom,scaleDiv);
How I can get this intervals and set they? I cant understand this, because documentation of Qwt very poor, and I don't have any examples about this. I tried code from this topic http://www.qtcentre.org/threads/3254...-in-the-middle but also has no effect.
Maybe [1-5], but what do I ( or anybody else beside you ) know about the interval you want to have displayed on your axis ?Quote:
How I can get this intervals ...
QwtScaleDiv::setInterval(). The docs might be weak, but ...Quote:
... and set they?
QwtScaleDiv stores the min/max values of a scale and the positions of its ticks. What else needs to be understood ?Quote:
I cant understand this, because documentation of Qwt very poor, ...
But is setting the ticks manually really what you want you to do - I guess instead you want to use the scale engine that is responsible for calculating the ticks configured, so that you get major ticks at each integer number: for this you have to play with the step parameter in QwtPlot::setAxisScale or with QwtPlot::setAxisMaxMajor().
Uwe