简体   繁体   English

PyQt和QwtPlot-如何更改刻度线方向?

[英]PyQt and QwtPlot - how to change ticks direction?

I have a Qt Designer file with QwtPlot widget. 我有一个带有QwtPlot小部件的Qt Designer文件。 Question: how to change Ticks direction with python code? 问题:如何使用python代码更改Ticks方向?

QwtPlot widget is accessible by self.ui.qwtPlot1 code line. QwtPlot小部件可通过self.ui.qwtPlot1代码行进行访问。 Below a picture is with view of axis - how to make qwtPlot axis look like this? 图片下方是轴视图-如何使qwtPlot轴看起来像这样? Thank You All for answers! 谢谢大家的答案!

http://i.stack.imgur.com/5uxp7.png http://i.stack.imgur.com/5uxp7.png

have you tried the set_axis_direction() method? 您是否尝试过set_axis_direction()方法?

self.ui.qwtPlot1.set_axis_direction(0, True)

or if self.ui.qwtPlot1 is a curvewidget then you might use: 或者如果self.ui.qwtPlot1是curvewidget,则可以使用:

self.ui.qwtPlot1.plot.set_axis_direction(0, True)

cheerio 欢乐

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

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