【发布时间】:2016-01-04 20:21:22
【问题描述】:
我是初学者并尝试使用 QCustopPlot。 我想画一个实时图表。 我使用这个示例代码。 但我有很多问题:
1) 如何将 yAxis 固定为特定的 int 数(0 到 50)
2) 如何修复 xAxis?我的意思是我想要一个图表,随着时间的推移,情节会移动。 (不是 xAxis 或 yAxis)
对不起,我的语言不好。
【问题讨论】:
标签: qt plot real-time qwt qcustomplot
我是初学者并尝试使用 QCustopPlot。 我想画一个实时图表。 我使用这个示例代码。 但我有很多问题:
1) 如何将 yAxis 固定为特定的 int 数(0 到 50)
2) 如何修复 xAxis?我的意思是我想要一个图表,随着时间的推移,情节会移动。 (不是 xAxis 或 yAxis)
对不起,我的语言不好。
【问题讨论】:
标签: qt plot real-time qwt qcustomplot
看起来这三个链接应该会有所帮助。
void QCPAxis::setRange ( double lower, double upper )
http://www.qcustomplot.com/documentation/classQCPAxis.html#a57d6ee9e9009fe88cb19db476ec70bca
void QCPAxis::moveRange ( double diff)
http://www.qcustomplot.com/documentation/classQCPAxis.html#a18f3a68f2b691af1fd34b6593c886630
QCPAxis类参考。
管理 a 内的单个轴 QCustomPlot。
http://www.qcustomplot.com/documentation/classQCPAxis.html#details
QWT 中也存在非常相似的功能。
QWT 中的cpuplot 示例显示了一个滚动实时示例。我找不到示例的在线链接,因此您应该下载并在构建后打开示例。
希望对您有所帮助。
【讨论】: