Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/328.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 垂直显示X个标签_Python_Pyqt_Pyqt5_Pyqtchart - Fatal编程技术网

Python 垂直显示X个标签

Python 垂直显示X个标签,python,pyqt,pyqt5,pyqtchart,Python,Pyqt,Pyqt5,Pyqtchart,我有一个PyQt图表,但X轴水平显示数据 如何在X轴上垂直显示标签 我想要的结果是(请原谅photoshop技术差!!) 您必须使用如下所示的轴方法: #add Axis chart.addAxis(axisX, Qt.AlignBottom) series.attachAxis(axisX) axisX.setLabelsAngle(-90) # <-------- #添加轴 chart.addAxis(axisX,Qt.AlignBottom) 系列。attachAxis(axi

我有一个PyQt图表,但X轴水平显示数据

如何在X轴上垂直显示标签

我想要的结果是(请原谅photoshop技术差!!)

您必须使用如下所示的轴方法:

#add Axis
chart.addAxis(axisX, Qt.AlignBottom)
series.attachAxis(axisX)
axisX.setLabelsAngle(-90) # <--------
#添加轴
chart.addAxis(axisX,Qt.AlignBottom)
系列。attachAxis(axisX)

axisX.setLabelsAngle(-90)#不太明显,但你不能将参数切换到qSeries.append,以及轴标题吗?我想我措辞错误,我更新了我的问题。@johnashu你必须说改变标签的方向,而不是轴。我完全是想改变轴,在QT文档中有方向选项的
QAbstractAxis
让我头晕目眩..我想我的措辞是错误的,我更新了我的问题。
#add Axis
chart.addAxis(axisX, Qt.AlignBottom)
series.attachAxis(axisX)
axisX.setLabelsAngle(-90) # <--------