void DataPlot::plot_Draw(double ps_x[], double ps_y[], double x_min, double x_max, double y_min, double y_max, int number_of_characteristics)
{
double psx[1500];
double psy[1500];
setAxisScale
(QwtPlot::xBottom, x_min, x_max
);
setAxisScale
(QwtPlot::yLeft, y_min, y_max
);
for (int j=0;j<number_of_characteristics;j++){
d_curves
[j
]->setRenderHint
(QwtPlotItem::RenderAntialiased);
for (int j1=0;j1<1500;j1++){
psx[j1]=ps_x[j1+j*1500];
psy[j1]=ps_y[j1+j*1500];
};
// Insert new curves
d_curves[j]->setRawSamples(psx,psy,1500);
d_curves[j]->attach(this);
};
replot();
}
void DataPlot::plot_Draw(double ps_x[], double ps_y[], double x_min, double x_max, double y_min, double y_max, int number_of_characteristics)
{
double psx[1500];
double psy[1500];
setAxisScale(QwtPlot::xBottom, x_min, x_max);
setAxisScale(QwtPlot::yLeft, y_min, y_max);
QwtPlotCurve *d_curves[number_of_characteristics];
for (int j=0;j<number_of_characteristics;j++){
d_curves[j] = new QwtPlotCurve("Gain spectra");
d_curves[j]->setRenderHint(QwtPlotItem::RenderAntialiased);
d_curves[j]->setPen(QPen(QColor(150,150,200),2));
d_curves[j]->setStyle(QwtPlotCurve::Lines);
for (int j1=0;j1<1500;j1++){
psx[j1]=ps_x[j1+j*1500];
psy[j1]=ps_y[j1+j*1500];
};
// Insert new curves
d_curves[j]->setRawSamples(psx,psy,1500);
d_curves[j]->attach(this);
};
replot();
}
To copy to clipboard, switch view to plain text mode
Bookmarks