How can I make the DC Motor speed graph with qcustomplot? I'm really new to that. Anybody have an idea?

Thank you in advance!

How can I make the DC Motor speed graph with QCustomplot?Return to overview

How can I make the DC Motor speed graph with qcustomplot? I'm really new to that. Anybody have an idea?

Thank you in advance!

you can create a .txt with your value and put this value in a QVector.

When you have your QVector you just have to create a widget in your .ui and promote it in Qcustomplot you have to add the qcustomplot.h and .cpp library to your project

and finally you can take inspiration from the example on this site :

// generate some data: QVector<double> x(101), y(101); // initialize with entries 0..100 for (int i=0; i<101; ++i) { x[i] = i/50.0 - 1; // x goes from -1 to 1 y[i] = x[i]*x[i]; // let's plot a quadratic function } // create graph and assign data to it: customPlot->addGraph(); customPlot->graph(0)->setData(x, y); // give the axes some labels: customPlot->xAxis->setLabel("x"); customPlot->yAxis->setLabel("y"); // set axes ranges, so we see all data: customPlot->xAxis->setRange(-1, 1); customPlot->yAxis->setRange(0, 1); customPlot->replot();

If not, further substantiate your question.

I hope I've helped you a little bit.

good day :)

This really worked. Thank you very much, good day :)