简体   繁体   English

如何使用Qt / QwtPlot设置固定轴间隔?

[英]How to set fixed axis intervals with Qt/QwtPlot?

I want to have a plotting widget in my Qt application. 我想在我的Qt应用程序中有一个绘图小部件。 Qwt provides such a widget with QwtPlot. Qwt通过QwtPlot提供了此类小部件。 However, I can't find any way to only display a certain part of the complete range of my data. 但是,我找不到任何方法来仅显示我数据完整范围的某个部分。

Specifically, I want to display spectrums with a frequency range from 0 to 2^14. 具体来说,我想显示频率范围为0到2 ^ 14的频谱。 For the GUI however, only the audible range from ~20-20k Hz is of significance, so I only want to display that part. 但是对于GUI,只有〜20-20k Hz的可听范围很重要,因此我只想显示该部分。
Do you know of any way of telling QwtPlot to do that? 您知道告诉QwtPlot这样做的任何方式吗?

Thank you for your answers. 谢谢您的回答。

Simple answer: Use QwtPlot::setAxisScale(). 简单的答案:使用QwtPlot :: setAxisScale()。

sorry for answering my own question. 很抱歉回答我自己的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM