Results 1 to 2 of 2

Thread: Lining up of plots in the same horizontal Layout

  1. #1
    Join Date
    Jan 2012
    Posts
    1
    Qt products
    Qt/Embedded
    Platforms
    Windows

    Default Lining up of plots in the same horizontal Layout

    I would like to know if there is way to line up more than one plots in the same horizontal layoutor attach more than one plot in the same horisontal layout.

    Thanks,
    Pari

  2. #2
    Join Date
    May 2012
    Location
    Bangalore, India
    Posts
    271
    Thanks
    29
    Thanked 50 Times in 47 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Lining up of plots in the same horizontal Layout

    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:--->

    Qt Code:
    1. QwtPlotCurve *curve[2];//The no. of curve you want to display on plot.
    2. for(i=0;i<2;i++){
    3. curve[i]=new QwtPlotCurve();
    4. }
    5. curve[0]->setPen(QPen(Qt::white,2,Qt::SolidLine));
    6. curve[0]->setCurveAttribute(QwtPlotCurve::Fitted);
    7. curve[0]->setRenderHint(QwtPlotItem::RenderAntialiased);
    8. curve[1]->setRenderHint(QwtPlotItem::RenderAntialiased);
    9. curve[0]->attach(this->plot);
    10. curve[1]->setPen(QPen(Qt::white,2,Qt::SolidLine));
    11. curve[1]->setCurveAttribute(QwtPlotCurve::Fitted);
    12. 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.

Similar Threads

  1. Replies: 1
    Last Post: 14th February 2012, 14:13
  2. size of horizontal layout
    By maarvi in forum Newbie
    Replies: 5
    Last Post: 28th June 2011, 10:24
  3. Lining up 3 curves of a QwtPlot
    By pihentagy in forum Qwt
    Replies: 2
    Last Post: 18th February 2011, 14:38
  4. Reg multiple plots in Qwt
    By Tavit in forum Qwt
    Replies: 4
    Last Post: 23rd June 2008, 13:43
  5. Lining up multiple plots
    By joel in forum Qwt
    Replies: 2
    Last Post: 20th June 2008, 00:25

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.