View Full Version : QwtPolarCurve setData()---help needed

5th August 2008, 08:39
im not able to set data in QwtPolarCurve. rather, im a little bit confused to use setData function in QwtPolarCurve. in QwtPlot, its easy to set data as there r enough overloading functions to set data. but the only option available in QwtPolarCurve to set data is setData(const QwtData &);. i referred demo example where RoseData and SpiralData curves r drawn. but i am not able to understand QwtData interfacing and not able to apply that derivation for my own derived class.

my requirement is, i want to set my own curve containing set of radius and azimuth values. how can i set data like
myPolarPlotCurve->setData(radius,azimuth). i tried to use QwtData interface, but im not succeeding, rather i am confused to how to assign set of radius and azimuth values.

im putting problem in code form here.


where MyQwtData is derived from QwtData.

will u pls suggest how can i derive QwtData class to plot my own set of azimuth and radius values on QwtPolarCurve. pls put sample code, that will be of great help to me.

5th August 2008, 19:31
You can use the same type of data classes for a QwtPolarCurve as for a QwtPlotCurve. Look in the Qwt docs which classes derived from QwtData are available. Of course you can also derive your own type of data class, but in most cases you don't need to.

The x-value is the azimuth, the y value repesents the radius.


6th August 2008, 07:30
thanks Uwe,

ya, i derived the data class from QwtArrayData. it worked fine. thanks again..