Thanks, this a great starting point. In case of a real time data where the x axis is time, is it possible to only display the last 5 seconds of the real time plot?
Thanks for replying, i found this on the official website www.qcustomplot.com/index.php/demos/realtimedatademo which was exactly what i was looking for, however it required version 2.0.0 beta to work
If you want to rescale axes automatically after the insertion of x and y, you must include in plot() function the following line before replot() and update() : ui->plot->graph(0)->rescaleAxes(true);
On Qt6.4 axes re-scaled only when I put this line betwen "setData" and "replot". So it need to be smth like this: ui->plot->graph(0)->setData(qv_x, qv_y); ui->plot->graph(0)->rescaleAxes(true); ui->plot->replot(); ui->plot->update();
hallo, how to change the direction of arrival of the colormap (realtime data, not dots/points/lines) when it is plotted on the x-axis (flip the direction of the x axis), so that the realtime data (colormap, not points or lines) will be plotted and start from right to left ? many thanks
It depends on how you're updating the data. In the video I pass a copy of the data to the plot widget, so if I just update the plot the data haven't changed. You could probably get around this by giving the plot a pointer to the data and then calling replot() or update().
@@fullmoon6661 That set's the data, but you're passing the vector, not a pointer to the vector. You can try passing a pointer to the vectors instead of the vectors.