我使用 Windows 7 x64、Qt 5.6、Visual Studio 2015、QCustomPlot 1.3.2。我需要从传感器(实时)绘制温度图。我每 500 毫秒(frequency
= 2 赫兹)接收一次温度值。我应该对实例应用哪些设置QCustomPlot
才能在time_period
= 10 分钟内收到最后一个值?这是续订插槽的片段:
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
.