1
我使用Windows 7 x64,Qt 5.6,Visual Studio 2015,QCustomPlot 1.3.2。我需要從傳感器繪製溫度圖(實時)。我每500 ms收到一個溫度值(frequency
= 2 Hz)。我應該對QCustomPlot
實例應用什麼設置才能讓time_period
= 10分鐘內收到最後一個值? 這裏是更新插槽的片段:設置實時QCustomPlot
double key = QDateTime::currentDateTime().toMSecsSinceEpoch()/1000.0;
custom_plot_->graph(0)->addData(key, value);
custom_plot_->graph(0)->removeDataBefore(old_items_count);
custom_plot_->xAxis->setRange(key + some_delta, old_items_count, Qt::AlignRight);
哪些變量old_items_count = func1(time_period, frequency)
和some_delta = func2(time_period, frequency)
的公式? 官方演示包含以下值:old_items_count = 8
,some_delta = 0.25
。