PySide6.QtGraphs.QValueAxis

class QValueAxis

The QValueAxis class adds values to a graph’s axes. More

Inheritance diagram of PySide6.QtGraphs.QValueAxis

Synopsis

Properties

  • labelDecimalsᅟ - Number of decimals used for showing the labels. When set to -1, decimal amount is adjusted automatically based on the values range. The default value is -1

  • labelFormatᅟ - Label format of the axis

  • maxᅟ - Maximum value on the axis

  • minᅟ - Minimum value on the axis

  • panᅟ - Value of the axis

  • subTickCountᅟ - Number of subticks on the axis. This indicates how many subticks are drawn between major lines on the graph. Labels are not drawn for subticks. The default value is 0

  • tickAnchorᅟ - Base value where the dynamically placed tick marks and labels are started from. The default value is 0

  • tickIntervalᅟ - Interval between dynamically placed tick marks and labels. The default value is 0, which means that intervals are automatically calculated based on the min and max range

  • zoomᅟ - Value of the axis

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

A value axis can be set up to show an axis line with tick marks, grid lines, and shades. The values on the axis are drawn at the positions of tick marks.

Note

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

property labelDecimalsᅟ: int

This property holds The number of decimals used for showing the labels. When set to -1, decimal amount is adjusted automatically based on the values range. The default value is -1..

Access functions:
property labelFormatᅟ: str

This property holds The label format of the axis..

The format string supports the following conversion specifiers, length modifiers, and flags provided by printf() in the standard C++ library: d, i, o, x, X, f, F, e, E, g, G, c.

The default value is empty, in which case ‘f’ format is used.

See also

asprintf()

Access functions:
property maxᅟ: float

This property holds The maximum value on the axis..

When setting this property, the minimum value is adjusted if necessary, to ensure that the range remains valid. The default value is 10.0

Access functions:
property minᅟ: float

This property holds The minimum value on the axis..

When setting this property, the maximum value is adjusted if necessary, to ensure that the range remains valid. The default value is 0.0

Access functions:
property panᅟ: float

This property holds The pan value of the axis..

The pan value moves the center of the axis without affecting intervals of grid and labels. The default value is 0.

Access functions:
property subTickCountᅟ: int

This property holds The number of subticks on the axis. This indicates how many subticks are drawn between major lines on the graph. Labels are not drawn for subticks. The default value is 0..

Access functions:
property tickAnchorᅟ: float

This property holds The base value where the dynamically placed tick marks and labels are started from. The default value is 0..

Access functions:
property tickIntervalᅟ: float

This property holds The interval between dynamically placed tick marks and labels. The default value is 0, which means that intervals are automatically calculated based on the min and max range..

Access functions:
property zoomᅟ: float

This property holds The zoom value of the axis..

The zoom value enlarges or shrinks the axis and thus the graph without affecting intervals of grid and labels. The default value is 1.

Access functions:
__init__([parent=None])
Parameters:

parentQObject

Constructs an axis object that is a child of parent.

labelDecimals()
Return type:

int

Getter of property labelDecimalsᅟ .

labelDecimalsChanged(decimals)
Parameters:

decimals – int

Notification signal of property labelDecimalsᅟ .

labelFormat()
Return type:

str

See also

setLabelFormat()

Getter of property labelFormatᅟ .

labelFormatChanged(format)
Parameters:

format – str

Notification signal of property labelFormatᅟ .

max()
Return type:

float

See also

setMax()

Getter of property maxᅟ .

maxChanged(max)
Parameters:

max – float

Notification signal of property maxᅟ .

min()
Return type:

float

See also

setMin()

Getter of property minᅟ .

minChanged(min)
Parameters:

min – float

Notification signal of property minᅟ .

pan()
Return type:

float

See also

setPan()

Getter of property panᅟ .

panChanged(pan)
Parameters:

pan – float

Notification signal of property panᅟ .

rangeChanged(min, max)
Parameters:
  • min – float

  • max – float

setLabelDecimals(decimals)
Parameters:

decimals – int

See also

labelDecimals()

Setter of property labelDecimalsᅟ .

setLabelFormat(format)
Parameters:

format – str

See also

labelFormat()

Setter of property labelFormatᅟ .

setMax(max)
Parameters:

max – float

See also

max()

Setter of property maxᅟ .

setMin(min)
Parameters:

min – float

See also

min()

Setter of property minᅟ .

setPan(pan)
Parameters:

pan – float

See also

pan()

Setter of property panᅟ .

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

  • max – float

Sets the range from min to max on the axis. If min is greater than max, this function returns without making any changes.

setSubTickCount(count)
Parameters:

count – int

See also

subTickCount()

Setter of property subTickCountᅟ .

setTickAnchor(anchor)
Parameters:

anchor – float

See also

tickAnchor()

Setter of property tickAnchorᅟ .

setTickInterval(interval)
Parameters:

interval – float

See also

tickInterval()

Setter of property tickIntervalᅟ .

setZoom(zoom)
Parameters:

zoom – float

See also

zoom()

Setter of property zoomᅟ .

subTickCount()
Return type:

int

Getter of property subTickCountᅟ .

subTickCountChanged(subTickCount)
Parameters:

subTickCount – int

Notification signal of property subTickCountᅟ .

tickAnchor()
Return type:

float

See also

setTickAnchor()

Getter of property tickAnchorᅟ .

tickAnchorChanged(tickAnchor)
Parameters:

tickAnchor – float

Notification signal of property tickAnchorᅟ .

tickInterval()
Return type:

float

Getter of property tickIntervalᅟ .

tickIntervalChanged(tickInterval)
Parameters:

tickInterval – float

Notification signal of property tickIntervalᅟ .

zoom()
Return type:

float

See also

setZoom()

Getter of property zoomᅟ .

zoomChanged(zoom)
Parameters:

zoom – float

Notification signal of property zoomᅟ .