Results 1 to 2 of 2

Thread: Plotting charts with QCustomPlot

  1. #1
    Join Date
    Oct 2014
    Posts
    2
    Qt products
    Platforms
    Unix/X11

    Default Plotting charts with QCustomPlot

    For plotting the graph I'm using QcustomPlot. My question is: How to plot a graph into an infinite loop with a few second delay of a random variable to whom a cancel button is pressed?

    Qt Code:
    1. QVector<double> x(101), y(101);
    2. for (int i=0; i<101; ++i)
    3. {
    4. x[i] = i;
    5. y[i] = i;
    6. }
    7.  
    8. customPlot->addGraph();
    9. customPlot->graph(0)->setData(x, y);
    10. customPlot->xAxis->setLabel("x");
    11. customPlot->yAxis->setLabel("y");
    12. customPlot->xAxis->setRange(-1, 1);
    13. customPlot->yAxis->setRange(0, 1);
    14. customPlot->replot();
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Plotting charts with QCustomPlot

    You need to ask this question on the QCustomPlot support forum.

Similar Threads

  1. QCustomplot
    By Harshavardhan in forum Newbie
    Replies: 1
    Last Post: 10th March 2014, 20:13
  2. reference to connect is ambiguous QQuickItem QMainWindow QCustomPlot
    By TheIndependentAquarius in forum Qt Quick
    Replies: 2
    Last Post: 29th January 2014, 14:04
  3. Help with QCustomPlot
    By aashok91 in forum Qt Programming
    Replies: 0
    Last Post: 9th January 2013, 00:56
  4. QRubberband and QcustomPlot
    By OzQTNoob in forum Newbie
    Replies: 1
    Last Post: 16th October 2012, 03:19
  5. Replies: 21
    Last Post: 8th December 2011, 02:18

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.