One way would be to attach a curve to your plot, i.e.:
QwtPlotCurve myCurve;
myCurve->attach(&d_plot);
You could then use (in a member function, or wherever you need) the function QwtPlotCurve::setRawSample
which has the following pretty much explanatory signature:
void QwtPlotCurve::setRawSample(const double* xData, const double* yData, int size);
Set your data with it and then call replot()
to refresh the plot. It means you must have also a vector for the x values.
The code would look like this:
int main( int argc, char **argv )
{
//...
Plotter* d_plot = new Plotter();
//Plot config
// PLOT THE DATA
std::vector<double> data_y;
data_y.push_back(1.03);
data_y.push_back(13.12);
std::vector<double> data_x;
data_x.push_back(1.0);
data_x.push_back(2.0);
//....
myCurve->setRawSample(data_x.data(),data_y.data(),data_y.size());
d_plot->resize( 600, 400 );
d_plot->replot();
d_plot->show();
//...
}
I'd suggest you study the Qwt doc about curve