What I have now to post the data is this:
d_grid = new QwtPolarGrid();
d_grid->setPen(QPen(Qt::white));
for ( int scaleId = 0; scaleId < QwtPolar::ScaleCount; scaleId++ )
{
d_grid->showGrid(scaleId);
d_grid->showMinorGrid(scaleId);
QPen minorPen(Qt::gray);
#if 0
minorPen.setStyle(Qt::DotLine);
#endif
d_grid->setMinorGridPen(scaleId, minorPen);
}
d_grid->setAxisPen(QwtPolar::AxisAzimuth, QPen(Qt::black));
d_grid->showAxis(QwtPolar::AxisAzimuth, true);
d_grid->showAxis(QwtPolar::AxisLeft, false);
d_grid->showAxis(QwtPolar::AxisRight, false);
d_grid->showAxis(QwtPolar::AxisTop, false);
d_grid->showAxis(QwtPolar::AxisBottom, false);
d_grid->showGrid(QwtPolar::Azimuth, true);
d_grid->showGrid(QwtPolar::Radius, true);
d_grid->attach(this);
// curves
m_curve = new QwtPolarCurve();
m_curve->setPen(QPen(Qt::red));
m_curve->setData(SinData(0,10));
m_curve->setPen(QPen(Qt::red));
m_curve->attach(this);
replot();
SinData is a class to return a QwtData pointer to setData, the arguments are an angle offset and amplitude of the line respectively. I'm attaching it to a QwtPolarPlot, the problem is I'm not seeing anything on the grid.
This wasn't my code, someone else wrote it.




Reply With Quote

Bookmarks