PDA

View Full Version : Controlling the margin of a QwtPolarPlot



Momergil
16th July 2014, 18:35
Hello!

10520

In the above image one can see that there is big wasted spaces between the actual QwtPolarPlot and its background "widget". My question is: how can I control that so I may make those margins be thinner? I couldn't find any method in QwtPolarPlot to control such margins :(


Thanks,

Momergil

Uwe
17th July 2014, 09:11
First of all you can set the contents margins ( see QWidget::setContentsMargins(). The radius of the plot canvas is then calculated in QwtPolarPlot::plotRect().

Another factor might be the value, that is returned from QwtPolarGrid::marginHint(). This margin depends on the width for the tick labels and could be optimized for a plot like yours.

Uwe

Momergil
17th July 2014, 18:45
Thanks Uwe. QWidget::setContentsMargins() did the trick (although using negative values for such method sounds strange to say the least!)

Momergil