PDA

View Full Version : Plotting charts with QCustomPlot



netinho.kernel
13th November 2014, 03:17
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?




QVector<double> x(101), y(101);
for (int i=0; i<101; ++i)
{
x[i] = i;
y[i] = i;
}

customPlot->addGraph();
customPlot->graph(0)->setData(x, y);
customPlot->xAxis->setLabel("x");
customPlot->yAxis->setLabel("y");
customPlot->xAxis->setRange(-1, 1);
customPlot->yAxis->setRange(0, 1);
customPlot->replot();

d_stranz
14th November 2014, 01:15
You need to ask this question on the QCustomPlot support forum. (http://www.qcustomplot.com/index.php/support/forum)