Results 1 to 5 of 5

Thread: Reg multiple plots in Qwt

  1. #1
    Join Date
    Mar 2008
    Posts
    52
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Reg multiple plots in Qwt

    Hi friends,
    I am acquire the data from hardware unit and saving into SQLITE database. I have So many fields in each record .I Identified and saved into relational database.I am able to retrieve and plot for one single field right now,i.e one curve. But how do i retrieve and plot for many fields, say for example 45 fields. I want to plot all the curves simultaneously in window with four qwt plot widgets.

    This is the code i am using right now to retrieve for one channel and plot the curve for it.

    Qt Code:
    1. QSqlQuery q1("SELECT Time_Interval, Channel_2 FROM Plotting_data1 ORDER BY CAST (Time_Interval AS INTEGER) LIMIT 60");
    2. vx.clear();
    3. vy.clear();
    4. if(q1.exec())
    5. {
    6. if (q1.first())
    7. {
    8. do
    9. {
    10. vx.push_back(q1.value(0).toDouble());
    11. vy.push_back(q1.value(1).toDouble());
    12. } while(q1.next());
    13. }
    14. if (vx.count() <= 0)
    15. return;
    16.  
    17. if (! newcurve)
    18. {
    19. newcurve= new QwtPlotCurve();
    20. newcurve->attach(qwtPlot);
    21. }
    22. newcurve->setData(vx.data(), vy.data(), vx.count());
    23. newcurve->setPen(QPen(Qt::blue));
    24. myPlot->replot();
    To copy to clipboard, switch view to plain text mode 
    Thank you...

    Regards,
    Tavit.

  2. #2
    Join Date
    Mar 2008
    Posts
    52
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg multiple plots in Qwt

    Hi i am sorry i posted qwt related post here by mistake. So i have posted this again in QWT sub forum. !!
    I din't know how to delete this thread from here

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Reg multiple plots in Qwt

    { two threads merged }

    Quote Originally Posted by Tavit View Post
    Hi i am sorry i posted qwt related post here by mistake. So i have posted this again in QWT sub forum. !!
    I din't know how to delete this thread from here
    Next time please notify the moderators to move the thread to the correct subforum instead of starting a new thread.
    J-P Nurmi

  4. #4
    Join Date
    Mar 2008
    Posts
    52
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg multiple plots in Qwt

    Ok Jpn i will do it from the next time. I by mistake posted a qwt related question in the General programming forum. I din't know how to delete it from there so i wrote that message. From next time in case i go wrong i will request the Moderator to move it.


    Thank You.

  5. #5
    Join Date
    Mar 2008
    Posts
    52
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg multiple plots in Qwt

    Hi guys.
    I am stuck with this problem... can you help any body...

    Thank you ...



    Regards,
    Tavit..

Similar Threads

  1. selecting text in Qwt plots
    By kaustav98255 in forum Qwt
    Replies: 3
    Last Post: 12th May 2008, 09:11
  2. Replies: 1
    Last Post: 13th March 2008, 08:19
  3. Replies: 4
    Last Post: 25th October 2007, 13:23
  4. QWT introduction
    By nitriles in forum Qwt
    Replies: 4
    Last Post: 28th September 2007, 11:48
  5. use interesting QWT Library with QT3.X
    By raphaelf in forum Qwt
    Replies: 2
    Last Post: 23rd January 2006, 12:24

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.