QCustomPlot Discussion and Comments

More than 1 graph realtime plotting Return to overview

Hello

In the setupRealtimeDataDemo example, I used :
- 4 custom graphs
- 50ms refresh
- 50 pts per refresh (1000 pts per seconds for each graphs)

How is it possible to synchronise theses 4 graphs ?

Instead of using 4 custom graphs, I use 1 custom graphs with 4 graphs.
I make a shift for each graph and a shift for each tick.

Now it's working fine.

An other question : How printing the data to a continuous printer such a DesignJet in realtime?

Could you elaborate on the method you used to plot these 4 graphs? I'm trying to do a similar project and have no idea where to begin

in the addgraph (key, value) function, I put shift value :

ui->customPlot->graph(0)->addData(key, iScaledWave0_l + shiftWave0);
ui->customPlot->graph(1)->addData(key, iScaledWave1_l + shiftWave1);
ui->customPlot->graph(2)->addData(key, iScaledWave2_l + shiftWave2);
ui->customPlot->graph(3)->addData(key, iScaledWave3_l + shiftWave3);

The range is computed for each value (somethink like this) :
float fADen_l = (fWaveMax_ - fWaveMin_); // min & max of the value
float fANom_l = (eScale_Max - eScale_Min); // min & max in the customgraph
float fA_l = fANom_l / fADen_l;
float fB_l = eScale_Max;
qint16 iScaledWave_l = fA_l * (fVal_p - fWaveMin_) - fB_l;

I discover QCustomPlot this week and I enjoy it