PDA

View Full Version : Space between scale and labels in qwtPLot



hassinoss
14th May 2014, 16:40
Hi all,

I overloaded the method label of QwtScaleDraw in order to show some kind of dates on the xAxis , but the problem is the space between the scalWidget and labels is small i can't see the whole date. I attached here a picture for the problem.

10360

How i can resolve this?

Uwe
15th May 2014, 06:24
Check the cpuplot example.

Uwe

hassinoss
15th May 2014, 12:02
Thanx for your reply, i added this
setAxisLabelAlignment( QwtPlot::xBottom, Qt::AlignLeft | Qt::AlignBottom ); to my code and it works fine.

But i want also display labels vertically and i have the same problem , how ican change the parametrs of setAxisLabelAlignment to resolve it.

Uwe
20th May 2014, 06:41
It is always a combination of alignment and rotation. The origin of the text rotation is at the end of the tick ( + some pixels margin ), so it depends on the angle of the rotation, if you have to align the text to the left or the right.

Put your newspaper on the table, fix a word with your finger and rotate the paper. It is the same as above - depending on the angle you have to put your finger left or right from the word.

Uwe