Class: QgsMeshRendererVectorSettings

class qgis.core.QgsMeshRendererVectorSettings

Bases: sip.wrapper

Represents a renderer settings for vector datasets

Note

The API is considered EXPERIMENTAL and can be changed without a notice

New in version 3.2:

Methods

arrowSettings

Returns settings for vector rendered with arrows

color

Returns color used for drawing arrows

colorRampShader

Sets the color ramp shader used to render vector datasets

coloringMethod

Returns the coloring method used to render vector datasets

filterMax

Returns filter value for vector magnitudes.

filterMin

Returns filter value for vector magnitudes.

isOnUserDefinedGrid

Returns whether vectors are drawn on user-defined grid

lineWidth

Returns line width of the arrow (in millimeters)

readXml

Reads configuration from the given DOM element

setArrowsSettings

Sets settings for vector rendered with arrows

setColor

Sets color used for drawing arrows

setColorRampShader

Returns the color ramp shader used to render vector datasets

setColoringMethod

Sets the coloring method used to render vector datasets

setFilterMax

Sets filter value for vector magnitudes.

setFilterMin

Sets filter value for vector magnitudes.

setLineWidth

Sets line width of the arrow in pixels (in millimeters)

setOnUserDefinedGrid

Toggles drawing of vectors on user defined grid

setStreamLinesSettings

Sets settings for vector rendered with streamlines

setSymbology

Sets the displaying method used to render vector datasets

setTracesSettings

Sets settings for vector rendered with traces

setUserGridCellHeight

Sets height of user grid cell (in pixels)

setUserGridCellWidth

Sets width of user grid cell (in pixels)

streamLinesSettings

Returns settings for vector rendered with streamlines

symbology

Returns the displaying method used to render vector datasets

tracesSettings

Returns settings for vector rendered with traces

userGridCellHeight

Returns height in pixels of user grid cell

userGridCellWidth

Returns width in pixels of user grid cell

vectorStrokeColoring

Returns the stroke coloring used to render vector datasets

writeXml

Writes configuration to a new DOM element

Attributes

Arrows

Streamlines

Traces

Arrows = 0
Streamlines = 1
class Symbology

Bases: int

Traces = 2
arrowSettings(self) QgsMeshRendererVectorArrowSettings

Returns settings for vector rendered with arrows

New in version 3.12.

Return type:

QgsMeshRendererVectorArrowSettings

color(self) QColor

Returns color used for drawing arrows

Return type:

QColor

colorRampShader(self) QgsColorRampShader

Sets the color ramp shader used to render vector datasets

New in version 3.14.

Return type:

QgsColorRampShader

coloringMethod(self) QgsInterpolatedLineColor.ColoringMethod

Returns the coloring method used to render vector datasets

New in version 3.14.

Return type:

QgsInterpolatedLineColor.ColoringMethod

filterMax(self) float

Returns filter value for vector magnitudes.

If magnitude of the vector is higher than this value, the vector is not drawn. -1 represents that filtering is not active.

Return type:

float

filterMin(self) float

Returns filter value for vector magnitudes.

If magnitude of the vector is lower than this value, the vector is not drawn. -1 represents that filtering is not active.

Return type:

float

isOnUserDefinedGrid(self) bool

Returns whether vectors are drawn on user-defined grid

Return type:

bool

lineWidth(self) float

Returns line width of the arrow (in millimeters)

Return type:

float

readXml(self, elem: QDomElement, context: QgsReadWriteContext = QgsReadWriteContext())

Reads configuration from the given DOM element

Parameters:
setArrowsSettings(self, arrowSettings: QgsMeshRendererVectorArrowSettings)

Sets settings for vector rendered with arrows

New in version 3.12.

Parameters:

arrowSettings (QgsMeshRendererVectorArrowSettings) –

setColor(self, color: QColor | Qt.GlobalColor | QGradient)

Sets color used for drawing arrows

Parameters:

color (Union[QColor) –

setColorRampShader(self, colorRampShader: QgsColorRampShader)

Returns the color ramp shader used to render vector datasets

New in version 3.14.

Parameters:

colorRampShader (QgsColorRampShader) –

setColoringMethod(self, coloringMethod: QgsInterpolatedLineColor.ColoringMethod)

Sets the coloring method used to render vector datasets

New in version 3.14.

Parameters:

coloringMethod (QgsInterpolatedLineColor.ColoringMethod) –

setFilterMax(self, filterMax: float)

Sets filter value for vector magnitudes.

See also

filterMax()

Parameters:

filterMax (float) –

setFilterMin(self, filterMin: float)

Sets filter value for vector magnitudes.

See also

filterMin()

Parameters:

filterMin (float) –

setLineWidth(self, lineWidth: float)

Sets line width of the arrow in pixels (in millimeters)

Parameters:

lineWidth (float) –

setOnUserDefinedGrid(self, enabled: bool)

Toggles drawing of vectors on user defined grid

Parameters:

enabled (bool) –

setStreamLinesSettings(self, streamLinesSettings: QgsMeshRendererVectorStreamlineSettings)

Sets settings for vector rendered with streamlines

New in version 3.12.

Parameters:

streamLinesSettings (QgsMeshRendererVectorStreamlineSettings) –

setSymbology(self, symbology: QgsMeshRendererVectorSettings.Symbology)

Sets the displaying method used to render vector datasets

New in version 3.12.

Parameters:

symbology (QgsMeshRendererVectorSettings.Symbology) –

setTracesSettings(self, tracesSettings: QgsMeshRendererVectorTracesSettings)

Sets settings for vector rendered with traces

New in version 3.12.

Parameters:

tracesSettings (QgsMeshRendererVectorTracesSettings) –

setUserGridCellHeight(self, height: int)

Sets height of user grid cell (in pixels)

Parameters:

height (int) –

setUserGridCellWidth(self, width: int)

Sets width of user grid cell (in pixels)

Parameters:

width (int) –

streamLinesSettings(self) QgsMeshRendererVectorStreamlineSettings

Returns settings for vector rendered with streamlines

New in version 3.12.

Return type:

QgsMeshRendererVectorStreamlineSettings

symbology(self) QgsMeshRendererVectorSettings.Symbology

Returns the displaying method used to render vector datasets

New in version 3.12.

Return type:

QgsMeshRendererVectorSettings.Symbology

tracesSettings(self) QgsMeshRendererVectorTracesSettings

Returns settings for vector rendered with traces

New in version 3.12.

Return type:

QgsMeshRendererVectorTracesSettings

userGridCellHeight(self) int

Returns height in pixels of user grid cell

Return type:

int

userGridCellWidth(self) int

Returns width in pixels of user grid cell

Return type:

int

vectorStrokeColoring(self) QgsInterpolatedLineColor

Returns the stroke coloring used to render vector datasets

New in version 3.14.

Return type:

QgsInterpolatedLineColor

writeXml(self, doc: QDomDocument, context: QgsReadWriteContext = QgsReadWriteContext()) QDomElement

Writes configuration to a new DOM element

Parameters:
Return type:

QDomElement