PySide6.QtGraphs.QAbstractAxis

class QAbstractAxis

QAbstractAxis 类是用于专门轴类的基础类。更多

PySide6.QtGraphs.QAbstractAxis 的继承图

继承自: QValueAxis, QDateTimeAxis, QBarCategoryAxis, QLogValueAxis, QColorAxis, QCategoryAxis

概要

属性

方法

信号

注意

本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。

详细描述

每个系列只能绑定到一个水平轴和一个垂直轴。

各种轴元素的属性和可见性,如轴线、标题、标签和网格线,可以单独控制。

class AxisType

此枚举类型指定轴对象的类型。

常量

描述

QAbstractAxis.AxisType.Value

QAbstractAxis.AxisType.BarCategory

QAbstractAxis.AxisType.DateTime

注意

当使用from __feature__ import true_property时,属性可以直接使用,否则通过访问器函数使用。

property alignmentᅟ: Combination of Qt.AlignmentFlag
Access functions:
property colorᅟ: QColor
Access functions:
property gridLineColorᅟ: QColor
Access functions:
property gridLinePenᅟ: QPen
Access functions:
property gridVisibleᅟ: bool

此属性控制网格线的可见性。默认情况下,值为 true

Access functions:
property labelsAngleᅟ: int

此属性保存轴标签的角度,以度为单位。

Access functions:
property labelsBrushᅟ: QBrush
Access functions:
property labelsColorᅟ: QColor
Access functions:
property labelsFontᅟ: QFont
Access functions:
property labelsTruncatedᅟ: bool
Access functions:
property labelsVisibleᅟ: bool

此属性表示轴标签是否可见。默认情况下,值为 true

Access functions:
property linePenᅟ: QPen
Access functions:
property lineVisibleᅟ: bool

此属性保存轴线的可见性。默认情况下,值为 true

Access functions:
property minorGridLineColorᅟ: QColor
Access functions:
property minorGridLinePenᅟ: QPen
Access functions:
property minorGridVisibleᅟ: bool
Access functions:
property orientationᅟ: Qt.Orientation
Access functions:
property reverseᅟ: bool
Access functions:
property shadesBorderColorᅟ: QColor
Access functions:
property shadesBrushᅟ: QBrush
Access functions:
property shadesColorᅟ: QColor
Access functions:
property shadesPenᅟ: QPen
Access functions:
property shadesVisibleᅟ: bool
Access functions:
property titleBrushᅟ: QBrush
Access functions:
property titleFontᅟ: QFont

此属性保存轴标题的字体。

Access functions:
property titleTextᅟ: str

此属性保存轴的标题。

默认情况下为空。轴标题支持HTML格式。

Access functions:
property titleVisibleᅟ: bool

此属性保存轴标题的可见性。

默认情况下,值为 true

Access functions:
property truncateLabelsᅟ: bool
Access functions:
property visibleᅟ: bool

此属性保存轴的可见性。默认情况下,值为true

Access functions:
alignment()
Return type:

AlignmentFlag 的组合

属性 alignmentᅟ 的获取器。

colorChanged(color)
Parameters:

颜色QColor

属性 colorᅟ 的通知信号。

gridLineColor()
Return type:

QColor

属性 gridLineColorᅟ 的获取器。

gridLineColorChanged(color)
Parameters:

颜色QColor

属性 gridLineColorᅟ 的通知信号。

gridLinePen()
Return type:

QPen

属性 gridLinePenᅟ 的获取器。

gridLinePenChanged(pen)
Parameters:

QPen

属性 gridLinePenᅟ 的通知信号。

gridVisibleChanged(visible)
Parameters:

visible – 布尔值

属性 gridVisibleᅟ 的通知信号。

hide()

使轴、标签和网格线不可见。

isGridLineVisible()
Return type:

布尔

属性 gridVisibleᅟ 的获取器。

isLineVisible()
Return type:

布尔

属性 lineVisibleᅟ 的获取器。

isMinorGridLineVisible()
Return type:

布尔

属性 minorGridVisibleᅟ 的获取器。

isReverse()
Return type:

布尔

属性 reverseᅟ 的获取器。

isTitleVisible()
Return type:

布尔

属性 titleVisibleᅟ 的获取器。

isVisible()
Return type:

布尔

属性 visibleᅟ 的获取器。

labelsAngle()
Return type:

整数

另请参阅

setLabelsAngle()

属性 labelsAngleᅟ 的获取器。

labelsAngleChanged(angle)
Parameters:

angle – int

属性 labelsAngleᅟ 的通知信号。

labelsBrush()
Return type:

QBrush

属性 labelsBrushᅟ 的获取器。

labelsBrushChanged(brush)
Parameters:

画笔QBrush

属性 labelsBrushᅟ 的通知信号。

labelsColor()
Return type:

QColor

属性 labelsColorᅟ 的获取器。

labelsColorChanged(color)
Parameters:

颜色QColor

属性 labelsColorᅟ 的通知信号。

labelsEditable()
Return type:

布尔

labelsEditableChanged(editable)
Parameters:

editable – 布尔值

labelsFont()
Return type:

QFont

属性 labelsFontᅟ 的获取器。

labelsFontChanged(pen)
Parameters:

QFont

属性 labelsFontᅟ 的通知信号。

labelsTruncated()
Return type:

布尔

属性 labelsTruncatedᅟ 的获取器。

labelsTruncatedChanged(labelsTruncated)
Parameters:

labelsTruncated – 布尔值

属性 labelsTruncatedᅟ 的通知信号。

labelsVisible()
Return type:

布尔

另请参阅

setLabelsVisible()

属性 labelsVisibleᅟ 的获取器。

labelsVisibleChanged(visible)
Parameters:

visible – 布尔值

属性 labelsVisibleᅟ 的通知信号。

linePen()
Return type:

QPen

属性 linePenᅟ 的获取器。

linePenChanged(pen)
Parameters:

QPen

属性 linePenᅟ 的通知信号。

linePenColor()
Return type:

QColor

属性 colorᅟ 的获取器。

lineVisibleChanged(visible)
Parameters:

visible – 布尔值

属性 lineVisibleᅟ 的通知信号。

minorGridLineColor()
Return type:

QColor

属性 minorGridLineColorᅟ 的获取器。

minorGridLineColorChanged(color)
Parameters:

颜色QColor

属性 minorGridLineColorᅟ 的通知信号。

minorGridLinePen()
Return type:

QPen

属性 minorGridLinePenᅟ 的获取器。

minorGridLinePenChanged(pen)
Parameters:

QPen

属性 minorGridLinePenᅟ 的通知信号。

minorGridVisibleChanged(visible)
Parameters:

visible – 布尔值

属性 minorGridVisibleᅟ 的通知信号。

orientation()
Return type:

方向

属性 orientationᅟ 的获取器。

reverseChanged(reverse)
Parameters:

reverse – 布尔值

属性 reverseᅟ 的通知信号。

setGridLineColor(color)
Parameters:

颜色QColor

属性 gridLineColorᅟ 的设置器。

setGridLinePen(pen)
Parameters:

QPen

属性 gridLinePenᅟ 的设置器。

setGridLineVisible([visible=true])
Parameters:

visible – 布尔值

属性 gridVisibleᅟ 的设置器。

setLabelsAngle(angle)
Parameters:

angle – int

另请参阅

labelsAngle()

属性 labelsAngleᅟ 的设置器。

setLabelsBrush(brush)
Parameters:

画笔QBrush

属性 labelsBrushᅟ 的设置器。

setLabelsColor(color)
Parameters:

颜色QColor

属性 labelsColorᅟ 的设置器。

setLabelsEditable([editable=true])
Parameters:

editable – 布尔值

setLabelsFont(font)
Parameters:

字体QFont

属性 labelsFontᅟ 的设置器。

setLabelsVisible([visible=true])
Parameters:

visible – 布尔值

另请参阅

labelsVisible()

属性 labelsVisibleᅟ 的设置器。

setLinePen(pen)
Parameters:

QPen

属性 linePenᅟ 的设置器。

setLinePenColor(color)
Parameters:

颜色QColor

属性 colorᅟ 的设置器。

setLineVisible([visible=true])
Parameters:

visible – 布尔值

确定轴线和刻度标记是否可见

另请参阅

isLineVisible()

属性 lineVisibleᅟ 的设置器。

setMax(max)
Parameters:

max – 对象

设置轴上显示的最大值。根据实际的轴类型,max参数会被转换为适当类型的值。如果转换不可能,函数调用将不执行任何操作。

setMin(min)
Parameters:

min – 对象

设置轴上显示的最小值。根据实际的轴类型,min 参数会被转换为适当类型的值。如果转换不可能,函数调用将不执行任何操作。

setMinorGridLineColor(color)
Parameters:

颜色QColor

属性 minorGridLineColorᅟ 的设置器。

setMinorGridLinePen(pen)
Parameters:

QPen

属性 minorGridLinePenᅟ 的设置器。

setMinorGridLineVisible([visible=true])
Parameters:

visible – 布尔值

属性 minorGridVisibleᅟ 的设置器。

setRange(min, max)
Parameters:
  • min – 对象

  • max – 对象

设置轴上显示的范围。根据实际的轴类型,minmax 参数会被转换为适当类型的值。如果转换不可能,函数调用将不执行任何操作。

setReverse([reverse=true])
Parameters:

reverse – 布尔值

属性 reverseᅟ 的设置器。

setShadesBorderColor(color)
Parameters:

颜色QColor

属性 shadesBorderColorᅟ 的设置器。

setShadesBrush(brush)
Parameters:

画笔QBrush

属性 shadesBrushᅟ 的设置器。

setShadesColor(color)
Parameters:

颜色QColor

属性 shadesColorᅟ 的设置器。

setShadesPen(pen)
Parameters:

QPen

属性 shadesPenᅟ 的设置器。

setShadesVisible([visible=true])
Parameters:

visible – 布尔值

属性 shadesVisibleᅟ 的设置器。

setTitleBrush(brush)
Parameters:

画笔QBrush

属性 titleBrushᅟ 的设置器。

setTitleFont(font)
Parameters:

字体QFont

设置用于绘制标题的字体为font

另请参阅

titleFont()

属性 titleFontᅟ 的设置器。

setTitleText(title)
Parameters:

标题 – str

另请参阅

titleText()

属性 titleTextᅟ 的设置器。

setTitleVisible([visible=true])
Parameters:

visible – 布尔值

另请参阅

isTitleVisible()

属性 titleVisibleᅟ 的设置器。

setTruncateLabels([truncateLabels=true])
Parameters:

truncateLabels – 布尔值

属性 truncateLabelsᅟ 的设置器。

setVisible([visible=true])
Parameters:

visible – 布尔值

将轴、标签和网格线的可见性设置为visible

另请参阅

isVisible()

属性 visibleᅟ 的设置器。

shadesBorderColor()
Return type:

QColor

属性 shadesBorderColorᅟ 的获取器。

shadesBorderColorChanged(color)
Parameters:

颜色QColor

属性 shadesBorderColorᅟ 的通知信号。

shadesBrush()
Return type:

QBrush

属性 shadesBrushᅟ 的获取器。

shadesBrushChanged(brush)
Parameters:

画笔QBrush

属性 shadesBrushᅟ 的通知信号。

shadesColor()
Return type:

QColor

属性 shadesColorᅟ 的获取器。

shadesColorChanged(color)
Parameters:

颜色QColor

属性 shadesColorᅟ 的通知信号。

shadesPen()
Return type:

QPen

属性 shadesPenᅟ 的获取器。

shadesPenChanged(pen)
Parameters:

QPen

属性 shadesPenᅟ 的通知信号。

shadesVisible()
Return type:

布尔

属性 shadesVisibleᅟ 的获取器。

shadesVisibleChanged(visible)
Parameters:

visible – 布尔值

属性 shadesVisibleᅟ 的通知信号。

show()

使轴、标签和网格线可见。

titleBrush()
Return type:

QBrush

属性 titleBrushᅟ 的获取器。

titleBrushChanged(brush)
Parameters:

画笔QBrush

属性 titleBrushᅟ 的通知信号。

titleFont()
Return type:

QFont

返回用于绘制标题的字体。

另请参阅

setTitleFont()

属性 titleFontᅟ 的获取器。

titleFontChanged(font)
Parameters:

字体QFont

属性 titleFontᅟ 的通知信号。

titleText()
Return type:

字符串

另请参阅

setTitleText()

属性 titleTextᅟ 的获取器。

titleTextChanged(title)
Parameters:

标题 – str

属性 titleTextᅟ 的通知信号。

titleVisibleChanged(visible)
Parameters:

visible – 布尔值

属性 titleVisibleᅟ 的通知信号。

truncateLabels()
Return type:

布尔

属性 truncateLabelsᅟ 的获取器。

truncateLabelsChanged(truncateLabels)
Parameters:

truncateLabels – 布尔值

属性 truncateLabelsᅟ 的通知信号。

visibleChanged(visible)
Parameters:

visible – 布尔值

属性 visibleᅟ 的通知信号。