Results 1 to 2 of 2

Thread: Baseline valid for all curves or only for a certain curve?

  1. #1
    Join Date
    Nov 2009
    Posts
    94
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Baseline valid for all curves or only for a certain curve?

    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 

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Baseline valid for all curves or only for a certain curve?

    As setBaseline is a method of a QwtPlotCurve object the answer should be obvious: each curve can have a different basline.

    Uwe

Similar Threads

  1. Replies: 1
    Last Post: 22nd January 2010, 14:34
  2. No valid Qt version set?
    By RoryWalsh in forum Qt Tools
    Replies: 4
    Last Post: 21st October 2009, 08:02
  3. XXXX is not a valid Windows CE app
    By Congenital Optimist in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 11th September 2009, 17:27
  4. What constitutes valid Qt folder?
    By piotr.dobrogost in forum Installation and Deployment
    Replies: 22
    Last Post: 26th July 2009, 03:41
  5. valid a path name
    By klaus1111 in forum Newbie
    Replies: 3
    Last Post: 23rd July 2006, 15:07

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.