【问题标题】:Qwt: Axis Border Dist?Qwt:轴边界区?
【发布时间】:2014-09-22 08:41:06
【问题描述】:

我有两个使用 qwt 创建的图。但我无法将它们的轴(xBottom)相互同步。

他们都有 (30,30) BorderDist

plot1->axisWidget(QwtPlot::xBottom)->setMinBorderDist(30,30) //distance between axis and border

但只有上图应用此功能,并且轴之间存在差异。

我该如何解决这个问题?

问候。

【问题讨论】:

  • 嗨,你能发布一个完整的编译项目来重现这个问题吗?你可以使用一些合适的网站;)

标签: qt qt4 axis qwt


【解决方案1】:

我解决了我的问题。轴号会导致此问题。如果我在标签和画布边之间留出足够的空间(边框),一切都很好。

像这样:

const int margin = 30;
plot1->plotLayout()->setCanvasMargin( margin, QwtPlot::yLeft );
plot1->plotLayout()->setCanvasMargin( margin, QwtPlot::yRight );
plot2->plotLayout()->setCanvasMargin( margin, QwtPlot::yLeft );
plot2->plotLayout()->setCanvasMargin( margin, QwtPlot::yRight );

感谢 Uwe 的帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多