Class: Qgs2DXyPlot¶
Base class for 2-dimensional plot/chart/graphs with an X and Y axes.
The base class is responsible for rendering the axis, grid lines and
chart area. Subclasses can implement the renderContent()
method to render their actual plot content.
Warning
This class is not considered stable API, and may change in future!
Added in version 3.26.
Class Hierarchy¶
Base classes¶
Base class for 2-dimensional plot/chart/graphs. |
|
Base class for plot/chart/graphs. |
Subclasses¶
A simple bar chart class. |
|
A simple line chart class. |
Methods
Automatically sets the grid and label intervals to optimal values for display in the given render context. |
|
Returns the fill symbol used to render the background of the chart. |
|
Returns the symbol used to render the border of the chart. |
|
Sets the fill symbol used to render the background of the chart. |
|
Sets the symbol used to render the border of the chart. |
|
Sets the maximum value of the x axis. |
|
Sets the minimum value of the x axis. |
|
Sets the maximum value of the y axis. |
|
Sets the minimum value of the y axis. |
|
Returns a reference to the plot's x axis. |
|
Returns the maximum value of the x axis. |
|
Returns the minimum value of the x axis. |
|
Returns a reference to the plot's y axis. |
|
Returns the maximum value of the y axis. |
|
Returns the minimum value of the y axis. |
- class qgis.core.Qgs2DXyPlot[source]¶
Bases:
Qgs2DPlot
- __init__()
Constructor for Qgs2DXyPlot.
- calculateOptimisedIntervals(self, context: QgsRenderContext, plotContext: QgsPlotRenderContext)[source]¶
Automatically sets the grid and label intervals to optimal values for display in the given render
context
.Intervals will be calculated in order to avoid overlapping axis labels and to ensure round values are shown.
- Parameters:
context (QgsRenderContext)
plotContext (QgsPlotRenderContext)
- chartBackgroundSymbol(self) QgsFillSymbol | None [source]¶
Returns the fill symbol used to render the background of the chart.
See also
- Return type:
Optional[QgsFillSymbol]
- chartBorderSymbol(self) QgsFillSymbol | None [source]¶
Returns the symbol used to render the border of the chart.
See also
- Return type:
Optional[QgsFillSymbol]
- setChartBackgroundSymbol(self, symbol: QgsFillSymbol | None)[source]¶
Sets the fill
symbol
used to render the background of the chart.Ownership of
symbol
is transferred to the plot.See also
- Parameters:
symbol (Optional[QgsFillSymbol])
- setChartBorderSymbol(self, symbol: QgsFillSymbol | None)[source]¶
Sets the
symbol
used to render the border of the chart.Ownership of
symbol
is transferred to the plot.See also
- Parameters:
symbol (Optional[QgsFillSymbol])
- setXMaximum(self, maximum: float)[source]¶
Sets the
maximum
value of the x axis.See also
- Parameters:
maximum (float)
- setXMinimum(self, minimum: float)[source]¶
Sets the
minimum
value of the x axis.See also
- Parameters:
minimum (float)
- setYMaximum(self, maximum: float)[source]¶
Sets the
maximum
value of the y axis.See also
- Parameters:
maximum (float)
- setYMinimum(self, minimum: float)[source]¶
Sets the
minimum
value of the y axis.See also
- Parameters:
minimum (float)
- xAxis(self) QgsPlotAxis ¶
Returns a reference to the plot’s x axis.
See also
- Return type:
- yAxis(self) QgsPlotAxis ¶
Returns a reference to the plot’s y axis.
See also
- Return type: