1

我是初学者并尝试使用 QCustopPlot。我想画一个实时图表。我使用这个示例代码。但我有很多问题:

1)如何将 yAxis 固定为特定的 int 数(0 到 50)

2) 如何修复 xAxis?我的意思是我想要一个图表,随着时间的推移,情节会移动。(不是 xAxis 或 yAxis)

对不起我的语言不好。

4

1 回答 1

1

看起来这三个链接应该有所帮助。

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类参考。
管理 QCustomPlot 内的单个轴。

http://www.qcustomplot.com/documentation/classQCPAxis.html#details

QWT 中也存在非常相似的功能。

cpuplotQWT 中的示例显示了滚动实时示例。我找不到示例的在线链接,因此您应该下载并在构建后打开示例。

希望有帮助。

于 2015-10-07T14:54:47.033 回答