Class: QgsHeatmapRenderer¶
A renderer which draws points as a live heatmap
Class Hierarchy¶
Base classes¶
Abstract base class for all 2D vector feature renderers.  | 
Methods
Returns the color ramp used for shading the heatmap.  | 
|
Returns the color ramp legend settings.  | 
|
Returns the maximum value used for shading the heatmap.  | 
|
Returns the radius for the heatmap  | 
|
Returns the map unit scale used for the heatmap's radius  | 
|
Returns the units used for the heatmap's radius  | 
|
Returns the render quality used for drawing the heatmap.  | 
|
Sets the color ramp to use for shading the heatmap.  | 
|
Sets the color ramp legend settings.  | 
|
Sets the maximum value used for shading the heatmap.  | 
|
Sets the radius for the heatmap  | 
|
Sets the map unit scale used for the heatmap's radius  | 
|
Sets the units used for the heatmap's radius  | 
|
Sets the render quality used for drawing the heatmap.  | 
|
Sets the expression used for weighting points when generating the heatmap.  | 
|
Returns the expression used for weighting points when generating the heatmap.  | 
Static Methods
Creates a new heatmap renderer instance from XML  | 
- class qgis.core.QgsHeatmapRenderer[source]¶
 Bases:
QgsFeatureRenderer- colorRamp(self) QgsColorRamp | None[source]¶
 Returns the color ramp used for shading the heatmap.
- Return type:
 Optional[QgsColorRamp]
- Returns:
 color ramp for heatmap
See also
- static convertFromRenderer(renderer: QgsFeatureRenderer | None) QgsHeatmapRenderer | None[source]¶
 - Parameters:
 renderer (Optional[QgsFeatureRenderer])
- Return type:
 Optional[QgsHeatmapRenderer]
- static create(element: QDomElement, context: QgsReadWriteContext) QgsFeatureRenderer | None[source]¶
 Creates a new heatmap renderer instance from XML
- Parameters:
 element (QDomElement)
context (QgsReadWriteContext)
- Return type:
 Optional[QgsFeatureRenderer]
- legendSettings(self) QgsColorRampLegendNodeSettings¶
 Returns the color ramp legend settings.
See also
Added in version 3.38.
- Return type:
 
- maximumValue(self) float[source]¶
 Returns the maximum value used for shading the heatmap.
- Return type:
 float
- Returns:
 maximum value for heatmap shading. If 0, then maximum value will be automatically calculated.
See also
- radius(self) float[source]¶
 Returns the radius for the heatmap
- Return type:
 float
- Returns:
 heatmap radius
See also
See also
See also
- radiusMapUnitScale(self) QgsMapUnitScale¶
 Returns the map unit scale used for the heatmap’s radius
- Return type:
 - Returns:
 map unit scale for heatmap’s radius
See also
See also
See also
- radiusUnit(self) Qgis.RenderUnit[source]¶
 Returns the units used for the heatmap’s radius
- Return type:
 - Returns:
 units for heatmap radius
See also
See also
See also
- renderQuality(self) float[source]¶
 Returns the render quality used for drawing the heatmap.
- Return type:
 float
- Returns:
 render quality. A value of 1 indicates maximum quality, and increasing the value will result in faster drawing but lower quality rendering.
See also
- setColorRamp(self, ramp: QgsColorRamp | None)[source]¶
 Sets the color ramp to use for shading the heatmap.
- Parameters:
 ramp (Optional[QgsColorRamp]) – color ramp for heatmap. Ownership of ramp is transferred to the renderer.
See also
- setLegendSettings(self, settings: QgsColorRampLegendNodeSettings)[source]¶
 Sets the color ramp legend
settings.See also
Added in version 3.38.
- Parameters:
 settings (QgsColorRampLegendNodeSettings)
- setMaximumValue(self, value: float)[source]¶
 Sets the maximum value used for shading the heatmap.
- Parameters:
 value (float) – maximum value for heatmap shading. Set to 0 for automatic calculation of maximum value.
See also
- setRadius(self, radius: float)[source]¶
 Sets the radius for the heatmap
- Parameters:
 radius (float) – heatmap radius
See also
See also
See also
- setRadiusMapUnitScale(self, scale: QgsMapUnitScale)[source]¶
 Sets the map unit scale used for the heatmap’s radius
- Parameters:
 scale (QgsMapUnitScale) – map unit scale for heatmap’s radius
See also
See also
See also
- setRadiusUnit(self, unit: Qgis.RenderUnit)[source]¶
 Sets the units used for the heatmap’s radius
- Parameters:
 unit (Qgis.RenderUnit) – units for heatmap radius
See also
See also
See also
- setRenderQuality(self, quality: int)[source]¶
 Sets the render quality used for drawing the heatmap.
- Parameters:
 quality (int) – render quality. A value of 1 indicates maximum quality, and increasing the value will result in faster drawing but lower quality rendering.
See also
- setWeightExpression(self, expression: str | None)[source]¶
 Sets the expression used for weighting points when generating the heatmap.
- Parameters:
 expression (Optional[str]) – point weight expression. If set to empty, all points are equally weighted.
See also
- symbolForFeature(self, feature: QgsFeature, context: QgsRenderContext) QgsSymbol | None[source]¶
 symbolForFeature2 in Python bindings
- Parameters:
 feature (QgsFeature)
context (QgsRenderContext)
- Return type:
 Optional[QgsSymbol]
- symbols(self, context: QgsRenderContext) List[QgsSymbol][source]¶
 symbol2 in Python bindings
- Parameters:
 context (QgsRenderContext)
- Return type:
 List[QgsSymbol]