PDA

View Full Version : Y Axis tick labels cut off on left



rbergeron
3rd November 2011, 12:53
We are using 6.0.1 release of QWT.
We have a problem with displaying the left scale tick labels (Y Axis). Labels are numeric.

Sometimes QwtPlot graphs will not update the width of the scale correctly such that when adding another digit
to any of the numbers on the scale, the left most digit will be cut off. For example when going
from 999 to 1,000, the display will read ,000.

The caveat to this is that the graph is not visible when it is updated. We have two graphs
on top of each other. We can toggle between each one being visible at a time. Both are being
updated as though they are visible. If the scale on the invisible graph changes such that another
digit is added, when we toggle to the invisible graph we see the effect.

The graph is dynamically updated periodically with one or more data points added each time.
If the previously invisible graph is redrawn with another set of data, it will fix itself and
draw correctly.

I have tried this with autoscale on and off - both cause the problem.

Spitfire
3rd November 2011, 13:58
Set some width of the left axis using
QwtScaleDraw::setMinimumExtent()

rbergeron
4th November 2011, 14:29
Thanks, Spitfire.

I will give that a try.