PySide6.QtGraphs.QAbstractAxis

class QAbstractAxis

The QAbstractAxis class is a base class used for specialized axis classes. More

Inheritance diagram of PySide6.QtGraphs.QAbstractAxis

Inherited by: QValueAxis, QDateTimeAxis, QBarCategoryAxis, QLogValueAxis, QColorAxis, QCategoryAxis

Synopsis

Properties

Methods

Signals

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

Each series can be bound to only one horizontal and vertical axis.

The properties and visibility of various axis elements, such as axis line, title, labels, and grid lines, can be individually controlled.

class AxisType

This enum type specifies the type of the axis object.

Constant

Description

QAbstractAxis.AxisType.Value

QAbstractAxis.AxisType.BarCategory

QAbstractAxis.AxisType.DateTime

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

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

This property holds The visibility of the grid lines. By default, the value is true..

Access functions:
property labelsAngleᅟ: int

This property holds The angle of the axis labels in degrees..

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

This property holds Whether axis labels are visible. By default, the value is true..

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

This property holds The visibility of the axis line. By default, the value is 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

This property holds The font of the title of the axis..

Access functions:
property titleTextᅟ: str

This property holds The title of the axis..

Empty by default. Axis titles support HTML formatting.

Access functions:
property titleVisibleᅟ: bool

This property holds The visibility of the axis title..

By default, the value is true.

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

This property holds The visibility of the axis. By default, the value is true..

Access functions:
alignment()
Return type:

Combination of AlignmentFlag

Getter of property alignmentᅟ .

colorChanged(color)
Parameters:

colorQColor

Notification signal of property colorᅟ .

gridLineColor()
Return type:

QColor

Getter of property gridLineColorᅟ .

gridLineColorChanged(color)
Parameters:

colorQColor

Notification signal of property gridLineColorᅟ .

gridLinePen()
Return type:

QPen

Getter of property gridLinePenᅟ .

gridLinePenChanged(pen)
Parameters:

penQPen

Notification signal of property gridLinePenᅟ .

gridVisibleChanged(visible)
Parameters:

visible – bool

Notification signal of property gridVisibleᅟ .

hide()

Makes the axis, labels, and grid lines invisible.

isGridLineVisible()
Return type:

bool

Getter of property gridVisibleᅟ .

isLineVisible()
Return type:

bool

Getter of property lineVisibleᅟ .

isMinorGridLineVisible()
Return type:

bool

Getter of property minorGridVisibleᅟ .

isReverse()
Return type:

bool

Getter of property reverseᅟ .

isTitleVisible()
Return type:

bool

Getter of property titleVisibleᅟ .

isVisible()
Return type:

bool

Getter of property visibleᅟ .

labelsAngle()
Return type:

int

See also

setLabelsAngle()

Getter of property labelsAngleᅟ .

labelsAngleChanged(angle)
Parameters:

angle – int

Notification signal of property labelsAngleᅟ .

labelsBrush()
Return type:

QBrush

Getter of property labelsBrushᅟ .

labelsBrushChanged(brush)
Parameters:

brushQBrush

Notification signal of property labelsBrushᅟ .

labelsColor()
Return type:

QColor

Getter of property labelsColorᅟ .

labelsColorChanged(color)
Parameters:

colorQColor

Notification signal of property labelsColorᅟ .

labelsEditable()
Return type:

bool

labelsEditableChanged(editable)
Parameters:

editable – bool

labelsFont()
Return type:

QFont

Getter of property labelsFontᅟ .

labelsFontChanged(pen)
Parameters:

penQFont

Notification signal of property labelsFontᅟ .

labelsTruncated()
Return type:

bool

Getter of property labelsTruncatedᅟ .

labelsTruncatedChanged(labelsTruncated)
Parameters:

labelsTruncated – bool

Notification signal of property labelsTruncatedᅟ .

labelsVisible()
Return type:

bool

Getter of property labelsVisibleᅟ .

labelsVisibleChanged(visible)
Parameters:

visible – bool

Notification signal of property labelsVisibleᅟ .

linePen()
Return type:

QPen

Getter of property linePenᅟ .

linePenChanged(pen)
Parameters:

penQPen

Notification signal of property linePenᅟ .

linePenColor()
Return type:

QColor

Getter of property colorᅟ .

lineVisibleChanged(visible)
Parameters:

visible – bool

Notification signal of property lineVisibleᅟ .

minorGridLineColor()
Return type:

QColor

Getter of property minorGridLineColorᅟ .

minorGridLineColorChanged(color)
Parameters:

colorQColor

Notification signal of property minorGridLineColorᅟ .

minorGridLinePen()
Return type:

QPen

Getter of property minorGridLinePenᅟ .

minorGridLinePenChanged(pen)
Parameters:

penQPen

Notification signal of property minorGridLinePenᅟ .

minorGridVisibleChanged(visible)
Parameters:

visible – bool

Notification signal of property minorGridVisibleᅟ .

orientation()
Return type:

Orientation

Getter of property orientationᅟ .

reverseChanged(reverse)
Parameters:

reverse – bool

Notification signal of property reverseᅟ .

setGridLineColor(color)
Parameters:

colorQColor

Setter of property gridLineColorᅟ .

setGridLinePen(pen)
Parameters:

penQPen

Setter of property gridLinePenᅟ .

setGridLineVisible([visible=true])
Parameters:

visible – bool

Setter of property gridVisibleᅟ .

setLabelsAngle(angle)
Parameters:

angle – int

See also

labelsAngle()

Setter of property labelsAngleᅟ .

setLabelsBrush(brush)
Parameters:

brushQBrush

Setter of property labelsBrushᅟ .

setLabelsColor(color)
Parameters:

colorQColor

Setter of property labelsColorᅟ .

setLabelsEditable([editable=true])
Parameters:

editable – bool

setLabelsFont(font)
Parameters:

fontQFont

Setter of property labelsFontᅟ .

setLabelsVisible([visible=true])
Parameters:

visible – bool

See also

labelsVisible()

Setter of property labelsVisibleᅟ .

setLinePen(pen)
Parameters:

penQPen

Setter of property linePenᅟ .

setLinePenColor(color)
Parameters:

colorQColor

Setter of property colorᅟ .

setLineVisible([visible=true])
Parameters:

visible – bool

Determines whether the axis line and tick marks are visible.

See also

isLineVisible()

Setter of property lineVisibleᅟ .

setMax(max)
Parameters:

max – object

Sets the maximum value shown on the axis. Depending on the actual axis type, the max parameter is converted to the appropriate type of value. If the conversion is impossible, the function call does nothing.

setMin(min)
Parameters:

min – object

Sets the minimum value shown on the axis. Depending on the actual axis type, the min parameter is converted to the appropriate type of value. If the conversion is impossible, the function call does nothing.

setMinorGridLineColor(color)
Parameters:

colorQColor

Setter of property minorGridLineColorᅟ .

setMinorGridLinePen(pen)
Parameters:

penQPen

Setter of property minorGridLinePenᅟ .

setMinorGridLineVisible([visible=true])
Parameters:

visible – bool

Setter of property minorGridVisibleᅟ .

setRange(min, max)
Parameters:
  • min – object

  • max – object

Sets the range shown on the axis. Depending on the actual axis type, the min and max parameters are converted to appropriate types of values. If the conversion is impossible, the function call does nothing.

setReverse([reverse=true])
Parameters:

reverse – bool

Setter of property reverseᅟ .

setShadesBorderColor(color)
Parameters:

colorQColor

Setter of property shadesBorderColorᅟ .

setShadesBrush(brush)
Parameters:

brushQBrush

Setter of property shadesBrushᅟ .

setShadesColor(color)
Parameters:

colorQColor

Setter of property shadesColorᅟ .

setShadesPen(pen)
Parameters:

penQPen

Setter of property shadesPenᅟ .

setShadesVisible([visible=true])
Parameters:

visible – bool

Setter of property shadesVisibleᅟ .

setTitleBrush(brush)
Parameters:

brushQBrush

Setter of property titleBrushᅟ .

setTitleFont(font)
Parameters:

fontQFont

Sets the font used to draw titles to font.

See also

titleFont()

Setter of property titleFontᅟ .

setTitleText(title)
Parameters:

title – str

See also

titleText()

Setter of property titleTextᅟ .

setTitleVisible([visible=true])
Parameters:

visible – bool

See also

isTitleVisible()

Setter of property titleVisibleᅟ .

setTruncateLabels([truncateLabels=true])
Parameters:

truncateLabels – bool

Setter of property truncateLabelsᅟ .

setVisible([visible=true])
Parameters:

visible – bool

Sets the visibility of the axis, labels, and grid lines to visible.

See also

isVisible()

Setter of property visibleᅟ .

shadesBorderColor()
Return type:

QColor

Getter of property shadesBorderColorᅟ .

shadesBorderColorChanged(color)
Parameters:

colorQColor

Notification signal of property shadesBorderColorᅟ .

shadesBrush()
Return type:

QBrush

Getter of property shadesBrushᅟ .

shadesBrushChanged(brush)
Parameters:

brushQBrush

Notification signal of property shadesBrushᅟ .

shadesColor()
Return type:

QColor

Getter of property shadesColorᅟ .

shadesColorChanged(color)
Parameters:

colorQColor

Notification signal of property shadesColorᅟ .

shadesPen()
Return type:

QPen

Getter of property shadesPenᅟ .

shadesPenChanged(pen)
Parameters:

penQPen

Notification signal of property shadesPenᅟ .

shadesVisible()
Return type:

bool

Getter of property shadesVisibleᅟ .

shadesVisibleChanged(visible)
Parameters:

visible – bool

Notification signal of property shadesVisibleᅟ .

show()

Makes the axis, labels, and grid lines visible.

titleBrush()
Return type:

QBrush

Getter of property titleBrushᅟ .

titleBrushChanged(brush)
Parameters:

brushQBrush

Notification signal of property titleBrushᅟ .

titleFont()
Return type:

QFont

Returns the font used to draw titles.

See also

setTitleFont()

Getter of property titleFontᅟ .

titleFontChanged(font)
Parameters:

fontQFont

Notification signal of property titleFontᅟ .

titleText()
Return type:

str

See also

setTitleText()

Getter of property titleTextᅟ .

titleTextChanged(title)
Parameters:

title – str

Notification signal of property titleTextᅟ .

titleVisibleChanged(visible)
Parameters:

visible – bool

Notification signal of property titleVisibleᅟ .

truncateLabels()
Return type:

bool

Getter of property truncateLabelsᅟ .

truncateLabelsChanged(truncateLabels)
Parameters:

truncateLabels – bool

Notification signal of property truncateLabelsᅟ .

visibleChanged(visible)
Parameters:

visible – bool

Notification signal of property visibleᅟ .