Hi, sorry if this may seem really simple but ive been looking around for ages to work out how to do this! So first i create a plot on my graph containing some X and Y values:
QwtPlotCurve *curvedata = new QwtPlotCurve("data");
curvedata->setSamples(x,y);
curvedata->setPen(QPen(Qt::black));
curvedata->attach(ui->plot);
ui->plot->replot();
Then i know i can plot a second set of data on top in a seperate part of the code using:
QwtPlotCurve *STDPlot = new QwtPlotCurve("STD");
STDPlot->setSamples(x,y);
STDPlot->setPen(QPen(Qt::black, 2));
STDPlot->attach(ui->plot);
STDPlot->setStyle(QwtPlotCurve::Sticks);
ui->plot->replot();
So now i have two sets of data on the same graph. Ok but now what if i want to retrieve my values from the first plot to check (for example) the maximum and then normalize the second set of values to this.
I found that
QwtPlotItemList test;
test = ui->plot->itemList();
allows me to get the information which is on the graph but i cannot figure out how i go from this to obtaining the XY data checking it and then updating it in the plot.
Sorry if this seems simple!
Indecently does anyone know a good QWT tutorial on the web with simple explanations on how to do these kind of basic things?
Thanks
Matt
Bookmarks