Hi Everyone,
my code has two vectors and i would like to plot them as x-y plot but nothing is appears for me at the widget and i do not have any error during compilation.
my code is
\code
// generate some data
QVector<double> x= QVector<double>::fromStdVector(thetas);
QVector<double> y= QVector<double>::fromStdVector(us);
// create graph and assign data to it:
ui->customPlot->addGraph();
ui->customPlot->graph(0)->setData(x, y);
// give the axes some labels:
ui->customPlot->xAxis->setLabel("thetas [degree]");
ui->customPlot->yAxis->setLabel("Scalar Stator Magnetic Pontential [Vs/m]");
// set axes ranges, so we see all data:
ui->customPlot->xAxis->setRange(0, 360);
ui->customPlot->yAxis->setRange(-500, 500);
ui->customPlot->replot();
//cout << thetas[jj] << endl ;
Bookmarks