View Full Version : QwtPolar - Title for Radius Axis
Crowley
21st May 2014, 13:51
Hello,
is it possible in QwtPolar to set a title/unit for the axes (at least for the radius axis)? Unlike QwtPlot, QwtPolarPlot misses methods like setAxisTitle(...)
I'm using QwtPolar 1.0.1.
QwtPolarMarker() should work.
Crowley
22nd May 2014, 11:06
As a workaround, ok. I am using it (seeing no alternative). But re-positioning for changes in the scale has to be done all "manually" then.
I would derive from QwtScaleDraw and overload one of its virtual methods, adding the QPainter::drawText() call you need. F.e:
class YourRadiusScaleDraw: public QwtScaleDraw
{
...
protected:
virtiual void drawBackbone( QPainter *painter ) const
{
QwtScaleDraw::drawBackbone( painter );
// now calculate the position/alignment/rotation for your text and
// do the painter->:drawText() call
...
}
};HTH, Uwe
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.