QWT图曲线轴线不可见
qwt plot curve axis not visible
我使用qwt plot curve来绘制曲线。x轴和y轴不可见,只有曲线可见。如何显示轴显示一些第一,最后和中间值轴的缩放间隔
我给你一个小例子:
// xBottom - x-axis yBottom - y-axis
plot->setAxisMaxMinor(QwtPlot::xBottom, 2);
plot->setAxisScale(QwtPlot::xBottom, 0, MAX_X_VALUE, 2);
plot->setAxisMaxMinor(QwtPlot::yLeft, 2);
plot->setAxisScale(QwtPlot::yLeft, 0, 1, 1);
plot->setAxisMaxMinor(QwtPlot::yLeft, 1);
plot->setAxisScale(QwtPlot::yLeft, -1, 1, 1);
1)您应该有一些QwtPlot对象。我假设你想画xBottom和yLeft轴。
QwtPlot *plot=new QwtPlot(this);
//following 4 lines may not be required because
//QwtPlot defaults are to show xBottom and yLeft axes
//and you use autoscaling for these axes
plot->enableAxis(QwtPlot::xBottom);
plot->enableAxis(QwtPlot::yLeft);
plot->setAxisAutoScale(QwtPlot::xBottom,true);
plot->setAxisAutoScale(QwtPlot::yLeft,true);
你已经有它,如果你使用QtDesigner和QwtPlot小部件与它。您可以使用ui->plot
访问它你应该有
QwtPlotCurve * curve = new QwtPlotCurve();
//.... attach some data to curve
curve->attach(plot);
3)可能需要调用replot
plot->replot();
相关文章:
- CGAL:如何创建填充边界曲线的曲面网格?
- 在 ubuntu 18.04.3 LTS 上安装 Qt 和 qwt:如何连接它们?
- 使用 SFML 绘制曲线会给出错误的形状
- 使用 GSL 库制作样条曲线并使用它们进行集成
- 扩充矩阵的行缩减-三维样条曲线计算
- 向心Catmull-Rom样条曲线插值alpha参数
- 使用 C++ 在 Qt5 中显示曲线
- Hermite曲线中的切线值
- c 击曲线在代表前打电话给COUT
- 创建给定最小值、最大值和长度的曲线
- 使用 c++ 在 OpenGL 中绘制贝塞尔曲线的切线
- 当对象脱离范围时,C 会调用击曲线吗?
- 在QGraphicsView上实现交互式样条曲线的最佳方法是什么?
- 将 openCv 中的曲线从 ROI 转换为帧
- 我的贝塞尔曲线有什么问题?
- QWT仅重点一个特定区域
- 您如何使形状沿着更BE的曲线SFML移动
- Qwt 的内存泄漏
- QWT图曲线轴线不可见
- QWT绘图移动曲线后,重新缩放或缩放光标