Class: QgsPlotAxis¶
Encapsulates the properties of a plot axis.
Warning
This class is not considered stable API, and may change in future!
Added in version 3.26.
List of all members, including inherited members
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 axis label suffix, or an empty string if no label suffix is to be used. |
|
Returns the placement for the axis label suffixes. |
|
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 axis label suffix. |
|
Sets the placement for the axis label suffixes. |
|
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. |
- class qgis.core.QgsPlotAxis[source]¶
Bases:
object- gridIntervalMajor(self) float[source]¶
Returns the interval of major grid lines for the axis.
See also
- Return type:
float
- gridIntervalMinor(self) float[source]¶
Returns the interval of minor grid lines for the axis.
See also
- Return type:
float
- gridMajorSymbol(self) QgsLineSymbol | None[source]¶
Returns the line symbol used to render the major lines in the axis grid.
See also
- Return type:
Optional[QgsLineSymbol]
- gridMinorSymbol(self) QgsLineSymbol | None[source]¶
Returns the line symbol used to render the minor lines in the axis grid.
See also
- Return type:
Optional[QgsLineSymbol]
- labelInterval(self) float[source]¶
Returns the interval of labels for the axis.
See also
- Return type:
float
- labelSuffix(self) str[source]¶
Returns the axis label suffix, or an empty string if no label suffix is to be used.
See also
See also
Added in version 3.32.
- Return type:
str
- labelSuffixPlacement(self) Qgis.PlotAxisSuffixPlacement[source]¶
Returns the placement for the axis label suffixes.
See also
See also
Added in version 3.32.
- Return type:
- numericFormat(self) QgsNumericFormat | None[source]¶
Returns the numeric format used for the axis labels.
See also
- Return type:
Optional[QgsNumericFormat]
- readXml(self, element: QDomElement, context: QgsReadWriteContext) bool[source]¶
Reads the axis’ properties from an XML
element.- Parameters:
element (QDomElement)
context (QgsReadWriteContext)
- Return type:
bool
- setGridIntervalMajor(self, interval: float)[source]¶
Sets the
intervalof major grid lines for the axis.See also
- Parameters:
interval (float)
- setGridIntervalMinor(self, interval: float)[source]¶
Sets the
intervalof minor grid lines for the axis.See also
- Parameters:
interval (float)
- setGridMajorSymbol(self, symbol: QgsLineSymbol | None)[source]¶
Sets the
symbolused to render the major lines in the axis grid.Ownership of
symbolis transferred to the plot.See also
- Parameters:
symbol (Optional[QgsLineSymbol])
- setGridMinorSymbol(self, symbol: QgsLineSymbol | None)[source]¶
Sets the
symbolused to render the minor lines in the axis grid.Ownership of
symbolis transferred to the plot.See also
- Parameters:
symbol (Optional[QgsLineSymbol])
- setLabelInterval(self, interval: float)[source]¶
Sets the
intervalof labels for the axis.See also
- Parameters:
interval (float)
- setLabelSuffix(self, suffix: str | None)[source]¶
Sets the axis label
suffix. Set to an empty string if no label suffix is to be used.See also
See also
Added in version 3.32.
- Parameters:
suffix (Optional[str])
- setLabelSuffixPlacement(self, placement: Qgis.PlotAxisSuffixPlacement)[source]¶
Sets the
placementfor the axis label suffixes.See also
See also
Added in version 3.32.
- Parameters:
placement (Qgis.PlotAxisSuffixPlacement)
- setNumericFormat(self, format: QgsNumericFormat | None)[source]¶
Sets the numeric
formatused for the axis labels.Ownership of
formatis transferred to the plot.See also
- Parameters:
format (Optional[QgsNumericFormat])
- setTextFormat(self, format: QgsTextFormat)[source]¶
Sets the text
formatused for the axis labels.See also
- Parameters:
format (QgsTextFormat)
- textFormat(self) QgsTextFormat[source]¶
Returns the text format used for the axis labels.
See also
- Return type:
- writeXml(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool[source]¶
Writes the axis’ properties into an XML
element.- Parameters:
element (QDomElement)
document (QDomDocument)
context (QgsReadWriteContext)
- Return type:
bool