- class QLogValueAxis#
The
QLogValueAxis
class adds a logarithmic scale to a chart’s axis. More…Synopsis#
Properties#
baseᅟ
- Of the logarithmlabelFormatᅟ
- Label format of the axismaxᅟ
- Maximum value on the axisminᅟ
- Minimum value on the axisminorTickCountᅟ
- Number of minor tick marks on the axis. This indicates how many grid lines are drawn between major ticks on the chart. Labels are not drawn for minor ticks. The default value is 0. Set the value to -1 and the number of grid lines between major ticks will be calculated automaticallytickCountᅟ
- Number of tick marks on the axis. This indicates how many grid lines are drawn on the chart. This value is read-only
Methods#
def
__init__()
def
base()
def
labelFormat()
def
max()
def
min()
def
minorTickCount()
def
setBase()
def
setLabelFormat()
def
setMax()
def
setMin()
def
setRange()
def
tickCount()
Signals#
def
baseChanged()
def
maxChanged()
def
minChanged()
def
rangeChanged()
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 logarithmic scale is a nonlinear scale that is based on orders of magnitude, so that each tick mark on the axis is the previous tick mark multiplied by a value.
Note
If
QLogValueAxis
is attached to a series with one or more points with negative or zero values on the associated dimension, the series will not be plotted at all. This is particularly relevant when XYModelMappers are used, since empty cells in models typically contain zero values.Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property baseᅟ: float#
This property holds The base of the logarithm..
The value has to be greater than 0 and cannot equal 1.
- Access functions:
Signal
baseChanged()
- 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.If
localizeNumbers
istrue
, the supported specifiers are limited to: d, e, E, f, g, G, and i. Also, only the precision modifier is supported. The rest of the formatting comes from the default QLocale of the application.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 value has to be greater than 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 value has to be greater than 0.
- Access functions:
Signal
minChanged()
- property minorTickCountᅟ: int#
This property holds The number of minor tick marks on the axis. This indicates how many grid lines are drawn between major ticks on the chart. Labels are not drawn for minor ticks. The default value is 0. Set the value to -1 and the number of grid lines between major ticks will be calculated automatically..
- Access functions:
- property tickCountᅟ: int#
This property holds The number of tick marks on the axis. This indicates how many grid lines are drawn on the chart. This value is read-only..
- Access functions:
Signal
tickCountChanged()
Constructs an axis object that is a child of
parent
.Getter of property
baseᅟ
.- baseChanged(base)#
- Parameters:
base – float
This signal is emitted when the
base
of the logarithm of the axis changes.Notification signal of property
baseᅟ
.- labelFormat()#
- Return type:
str
See also
Getter of property
labelFormatᅟ
.- labelFormatChanged(format)#
- Parameters:
format – str
This signal is emitted when the
format
of axis labels changes.Notification signal of property
labelFormatᅟ
.Getter of property
maxᅟ
.- maxChanged(max)#
- Parameters:
max – float
This signal is emitted when the maximum value of the axis, specified by
max
, changes.Notification signal of property
maxᅟ
.Getter of property
minᅟ
.- minChanged(min)#
- Parameters:
min – float
This signal is emitted when the minimum value of the axis, specified by
min
, changes.Notification signal of property
minᅟ
.- minorTickCount()#
- Return type:
int
See also
Getter of property
minorTickCountᅟ
.- minorTickCountChanged(minorTickCount)#
- Parameters:
minorTickCount – int
This signal is emitted when the number of minor tick marks on the axis, specified by
minorTickCount
, changes.Notification signal of property
minorTickCountᅟ
.- rangeChanged(min, max)#
- Parameters:
min – float
max – float
This signal is emitted when the minimum or maximum value of the axis, specified by
min
andmax
, changes.Setter of property
baseᅟ
.- setLabelFormat(format)#
- Parameters:
format – str
See also
Setter of property
labelFormatᅟ
.Setter of property
maxᅟ
.Setter of property
minᅟ
.- setMinorTickCount(minorTickCount)#
- Parameters:
minorTickCount – int
See also
Setter of property
minorTickCountᅟ
.- 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.- tickCount()#
- Return type:
int
Getter of property
tickCountᅟ
.- tickCountChanged(tickCount)#
- Parameters:
tickCount – int
This signal is emitted when the number of tick marks on the axis, specified by
tickCount
, changes.Notification signal of property
tickCountᅟ
.