Plotting Graph in Qt
-
wrote on 27 May 2016, 02:54 last edited by A Former User
How to plot graph in real time by asking inputs to user, and how to input x[] and y[] set values before calling setData(x,y).
int x1 = ui->x1->text().toInt();
int y1 = ui->y1->text().toInt();
int x2 = ui->x2->text().toInt();
int y2 = ui->y2->text().toInt();what I need to make to join these 2 points i.e p1(x1,y1) and p2(x2,y2)
then I can call the function
ui->customPlot->addGraph();
ui->customPlot->graph(0)->setData(x, y); -
How to plot graph in real time by asking inputs to user, and how to input x[] and y[] set values before calling setData(x,y).
int x1 = ui->x1->text().toInt();
int y1 = ui->y1->text().toInt();
int x2 = ui->x2->text().toInt();
int y2 = ui->y2->text().toInt();what I need to make to join these 2 points i.e p1(x1,y1) and p2(x2,y2)
then I can call the function
ui->customPlot->addGraph();
ui->customPlot->graph(0)->setData(x, y);wrote on 27 May 2016, 04:58 last edited by@Jai_Balaj
Not tried, Just a hint may beaddData
? http://www.qcustomplot.com/index.php/support/forum/66
1/2