I want to use Autoscaling for QWT plot item. Is it possible to specify a small %margin for autoscale?. For example if y range is -2 to 10, I want it to autoscale to ( (-2) - 10% of range) to (10 + 10% of range)
I want to use Autoscaling for QWT plot item. Is it possible to specify a small %margin for autoscale?. For example if y range is -2 to 10, I want it to autoscale to ( (-2) - 10% of range) to (10 + 10% of range)
QwtScaleEngine::setMargins() ?
Uwe
mqt (1st August 2013)
There is one problem. I have the plot with size almost (not exactly) X=0 to 1.0 and Y=0 to 1.0. The limits vary dynamically small amounts like +/- 0.3
Whatever margin i set using, say, setMargins(0.05), it sets the margin as 0.2. What am I missing?
The margins ( set with setMargins() ) are added to the interval that is used by the autoscaler. If QwtScaleEngine::Floating is not set, the autoscaler aligns the interval to a step size.
So maybe also enabling QwtScaleEngine::Floating is what you are looking for.
Uwe
That worked...Thanks Uwe
Bookmarks