PDA

View Full Version : Problems with Dial/Compass and with logarithmic scale



alu23
13th March 2008, 08:55
Hello,

1) How can I change the font size on a Dial/Compass?
My widget is derived from QwtCompass and I want to change the font size of the labels.
How can I do that?

2) When I use the Log10Scale in a plot e. g. with a "stick" curve style, the sticks "hang down" from the ceiling instead of doing like expected.
I guess this is because there's no 0 on the y-axis with a logarithmic scale.
What can I do about it to use a logarithmic scale with sticks drawn "correctly"?

Thanks in advance

Alu

Uwe
14th March 2008, 07:23
1) How can I change the font size on a Dial/Compass?

compass->setFont(...);


2) When I use the Log10Scale in a plot e. g. with a "stick" curve style, the sticks "hang down" from the ceiling instead of doing like expected.
I guess this is because there's no 0 on the y-axis with a logarithmic scale.

You need to assign a baseline ( f.e QwtPlotCurve::setBaseline(1.0e-100) ) with a value, that is inside the range of a logarithmic calculation. Be careful, that the value is not too small compared to your axis scale to avoid integer overruns.

Uwe

alu23
14th March 2008, 12:38
Thank you!