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

Qt Code:
  1. int k=0;
  2. for( std::map<QString, complex<double> (*)(complex<double>)>::iterator ii = optProbList[index]->constraints.begin(); ii!= optProbList[index]->constraints.end(); ++ii)
  3. {
  4. //=========================== plot the constraint curves
  5. // add curves
  6. QwtPlotCurve *curve1 = new QwtPlotCurve();
  7.  
  8. curve1->setPen(QColor(Qt::red));
  9. curve1->setStyle(QwtPlotCurve::Lines);
  10. curve1->setCurveAttribute(QwtPlotCurve::Fitted);
  11. curve1->setBrush(QBrush(Qt::black, Qt::FDiagPattern));
  12.  
  13. if(equality[k]<0){
  14. curve1->setBaseline(rangex2[1]);
  15. }
  16. else if(equality[k]>0){
  17. curve1->setBaseline(rangex2[0]);
  18. }
  19. else{
  20. curve1->setBrush(QBrush(Qt::NoBrush));
  21. }
  22. // copy the data into the curves
  23. //
  24. curve1->setData(SimpleData((*ii).second, rangex1, rangex2, 0.05));
  25.  
  26. curve1->attach(this);
  27. //=========================== end of plot the constraint curves
  28. k= k+1;
  29. }
To copy to clipboard, switch view to plain text mode