PDA

View Full Version : Baseline valid for all curves or only for a certain curve?



rambo83
28th January 2010, 12:36
Hello,

could you tell me whether setting the baseline has influence on all curves or only on that curve to which I set this baseline? I have noticed that the brushed area under/above curves does not fit allways to my settings, that is the reason why I'm asking here.

best regards,

Vitali


int k=0;
for( std::map<QString, complex<double> (*)(complex<double>)>::iterator ii = optProbList[index]->constraints.begin(); ii!= optProbList[index]->constraints.end(); ++ii)
{
//=========================== plot the constraint curves
// add curves
QwtPlotCurve *curve1 = new QwtPlotCurve();

curve1->setPen(QColor(Qt::red));
curve1->setStyle(QwtPlotCurve::Lines);
curve1->setCurveAttribute(QwtPlotCurve::Fitted);
curve1->setBrush(QBrush(Qt::black, Qt::FDiagPattern));

if(equality[k]<0){
curve1->setBaseline(rangex2[1]);
}
else if(equality[k]>0){
curve1->setBaseline(rangex2[0]);
}
else{
curve1->setBrush(QBrush(Qt::NoBrush));
}
// copy the data into the curves
//
curve1->setData(SimpleData((*ii).second, rangex1, rangex2, 0.05));

curve1->attach(this);
//=========================== end of plot the constraint curves
k= k+1;
}

Uwe
28th January 2010, 12:57
As setBaseline is a method of a QwtPlotCurve object the answer should be obvious: each curve can have a different basline.

Uwe