PySide6.QtGraphs.QValueAxis¶
- class QValueAxis¶
The
QValueAxis
class adds values to a graph’s axes. More…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 -1labelFormatᅟ
- Label format of the axismaxᅟ
- Maximum value on the axisminᅟ
- Minimum value on the axispanᅟ
- Value of the axissubTickCountᅟ
- 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 0tickAnchorᅟ
- Base value where the dynamically placed tick marks and labels are started from. The default value is 0tickIntervalᅟ
- 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 rangezoomᅟ
- Value of the axis
Methods¶
def
__init__()
def
labelDecimals()
def
labelFormat()
def
max()
def
min()
def
pan()
def
setLabelFormat()
def
setMax()
def
setMin()
def
setPan()
def
setRange()
def
setTickAnchor()
def
setZoom()
def
subTickCount()
def
tickAnchor()
def
tickInterval()
def
zoom()
Signals¶
def
maxChanged()
def
minChanged()
def
panChanged()
def
rangeChanged()
def
zoomChanged()
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:
Signal
maxChanged()
- 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:
Signal
minChanged()
- 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:
Signal
panChanged()
- 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:
Signal
zoomChanged()
Constructs an axis object that is a child of
parent
.- labelDecimals()¶
- Return type:
int
See also
Getter of property
labelDecimalsᅟ
.- labelDecimalsChanged(decimals)¶
- Parameters:
decimals – int
Notification signal of property
labelDecimalsᅟ
.- labelFormat()¶
- Return type:
str
See also
Getter of property
labelFormatᅟ
.- labelFormatChanged(format)¶
- Parameters:
format – str
Notification signal of property
labelFormatᅟ
.Getter of property
maxᅟ
.- maxChanged(max)¶
- Parameters:
max – float
Notification signal of property
maxᅟ
.Getter of property
minᅟ
.- minChanged(min)¶
- Parameters:
min – float
Notification signal of property
minᅟ
.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
Setter of property
labelDecimalsᅟ
.- setLabelFormat(format)¶
- Parameters:
format – str
See also
Setter of property
labelFormatᅟ
.Setter of property
maxᅟ
.Setter of property
minᅟ
.Setter of property
panᅟ
.- setRange(min, max)¶
- Parameters:
min – float
max – float
Sets the range from
min
tomax
on the axis. Ifmin
is greater thanmax
, this function returns without making any changes.- setSubTickCount(count)¶
- Parameters:
count – int
See also
Setter of property
subTickCountᅟ
.- setTickAnchor(anchor)¶
- Parameters:
anchor – float
See also
Setter of property
tickAnchorᅟ
.- setTickInterval(interval)¶
- Parameters:
interval – float
See also
Setter of property
tickIntervalᅟ
.Setter of property
zoomᅟ
.- subTickCount()¶
- Return type:
int
See also
Getter of property
subTickCountᅟ
.- subTickCountChanged(subTickCount)¶
- Parameters:
subTickCount – int
Notification signal of property
subTickCountᅟ
.- tickAnchor()¶
- Return type:
float
See also
Getter of property
tickAnchorᅟ
.- tickAnchorChanged(tickAnchor)¶
- Parameters:
tickAnchor – float
Notification signal of property
tickAnchorᅟ
.- tickInterval()¶
- Return type:
float
See also
Getter of property
tickIntervalᅟ
.- tickIntervalChanged(tickInterval)¶
- Parameters:
tickInterval – float
Notification signal of property
tickIntervalᅟ
.Getter of property
zoomᅟ
.- zoomChanged(zoom)¶
- Parameters:
zoom – float
Notification signal of property
zoomᅟ
.