Class: QgsPlotAxis¶
- class qgis.core.QgsPlotAxis¶
Bases:
sip.wrapper
Encapsulates the properties of a plot axis.
Warning
This class is not considered stable API, and may change in future!
New in version 3.26:
Methods
Returns the interval of major grid lines for the axis.
Returns the interval of minor grid lines for the axis.
Returns the line symbol used to render the major lines in the axis grid.
Returns the line symbol used to render the minor lines in the axis grid.
Returns the interval of labels for the axis.
Returns the numeric format used for the axis labels.
Reads the axis' properties from an XML
element
.Sets the
interval
of major grid lines for the axis.Sets the
interval
of minor grid lines for the axis.Sets the
symbol
used to render the major lines in the axis grid.Sets the
symbol
used to render the minor lines in the axis grid.Sets the
interval
of labels for the axis.Sets the numeric
format
used for the axis labels.Sets the text
format
used for the axis labels.Returns the text format used for the axis labels.
Writes the axis' properties into an XML
element
.- gridIntervalMajor(self) float ¶
Returns the interval of major grid lines for the axis.
See also
- Return type:
float
- gridIntervalMinor(self) float ¶
Returns the interval of minor grid lines for the axis.
See also
- Return type:
float
- gridMajorSymbol(self) QgsLineSymbol ¶
Returns the line symbol used to render the major lines in the axis grid.
See also
- Return type:
- gridMinorSymbol(self) QgsLineSymbol ¶
Returns the line symbol used to render the minor lines in the axis grid.
See also
- Return type:
- labelInterval(self) float ¶
Returns the interval of labels for the axis.
See also
- Return type:
float
- numericFormat(self) QgsNumericFormat ¶
Returns the numeric format used for the axis labels.
See also
- Return type:
- readXml(self, element: QDomElement, context: QgsReadWriteContext) bool ¶
Reads the axis’ properties from an XML
element
.- Parameters:
element (QDomElement) –
context (QgsReadWriteContext) –
- Return type:
bool
- setGridIntervalMajor(self, interval: float)¶
Sets the
interval
of major grid lines for the axis.See also
- Parameters:
interval (float) –
- setGridIntervalMinor(self, interval: float)¶
Sets the
interval
of minor grid lines for the axis.See also
- Parameters:
interval (float) –
- setGridMajorSymbol(self, symbol: QgsLineSymbol)¶
Sets the
symbol
used to render the major lines in the axis grid.Ownership of
symbol
is transferred to the plot.See also
- Parameters:
symbol (QgsLineSymbol) –
- setGridMinorSymbol(self, symbol: QgsLineSymbol)¶
Sets the
symbol
used to render the minor lines in the axis grid.Ownership of
symbol
is transferred to the plot.See also
- Parameters:
symbol (QgsLineSymbol) –
- setLabelInterval(self, interval: float)¶
Sets the
interval
of labels for the axis.See also
- Parameters:
interval (float) –
- setNumericFormat(self, format: QgsNumericFormat)¶
Sets the numeric
format
used for the axis labels.Ownership of
format
is transferred to the plot.See also
- Parameters:
format (QgsNumericFormat) –
- setTextFormat(self, format: QgsTextFormat)¶
Sets the text
format
used for the axis labels.See also
- Parameters:
format (QgsTextFormat) –
- textFormat(self) QgsTextFormat ¶
Returns the text format used for the axis labels.
See also
- Return type:
- writeXml(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool ¶
Writes the axis’ properties into an XML
element
.- Parameters:
element (QDomElement) –
document (QDomDocument) –
context (QgsReadWriteContext) –
- Return type:
bool