plot or curve, if it is plot then make two object of QwtPlot and place it in the widget by using setGeometry().
And if you have to place two curve in one plot then, just make an array of QwtPlotCurve. The following example will give you a brief view on this:--->
QwtPlotCurve *curve
[2];
//The no. of curve you want to display on plot. for(i=0;i<2;i++){
}
curve
[0]->setPen
(QPen(Qt
::white,
2,Qt
::SolidLine));
curve
[0]->setRenderHint
(QwtPlotItem::RenderAntialiased);
curve
[1]->setRenderHint
(QwtPlotItem::RenderAntialiased);
curve[0]->attach(this->plot);
curve
[1]->setPen
(QPen(Qt
::white,
2,Qt
::SolidLine));
curve[1]->attach(this->plot);
QwtPlotCurve *curve[2];//The no. of curve you want to display on plot.
for(i=0;i<2;i++){
curve[i]=new QwtPlotCurve();
}
curve[0]->setPen(QPen(Qt::white,2,Qt::SolidLine));
curve[0]->setCurveAttribute(QwtPlotCurve::Fitted);
curve[0]->setRenderHint(QwtPlotItem::RenderAntialiased);
curve[1]->setRenderHint(QwtPlotItem::RenderAntialiased);
curve[0]->attach(this->plot);
curve[1]->setPen(QPen(Qt::white,2,Qt::SolidLine));
curve[1]->setCurveAttribute(QwtPlotCurve::Fitted);
curve[1]->attach(this->plot);
To copy to clipboard, switch view to plain text mode
This is how you would make several curve on the graph.
Bookmarks