graphinglib.Stream.__init__#
- Stream.__init__(x_data: ArrayLike, y_data: ArrayLike, u_data: ArrayLike, v_data: ArrayLike, density: float | tuple[float, float] = 1, line_width: float | Inherit = Inherit, color: str | TypeAliasForwardRef('ArrayLike') | Inherit = Inherit, color_map: str | Colormap | Inherit = Inherit, arrow_size: float | Inherit = Inherit) None[source]#
This class implements stream plots.
- Parameters:
- x_data, y_dataArrayLike
x and y coordinates of the vectors as a mesh grid.
- u_data, v_dataArrayLike
Magnitudes of the vectors for each point of the mesh grid.
- densityfloat or tuple[float, float]
Density of stream lines. Can be specified independently for the x and y coordinates by specifying a density tuple instead. Defaults to 1. Typical range is
0.5to3.- line_widthfloat
Width of the stream lines. Default depends on the
figure_styleconfiguration. Typical range is0.5to3points.- colorstr or ArrayLike
Color of the stream lines. If an array of intensities is provided, the values are mapped to the specified color map. Default depends on the
figure_styleconfiguration.- color_mapstr or Colormap
Color map of the stream lines, to be used in combination with the color parameter to specify intensity. Examples include
"viridis","plasma", and"coolwarm". Default depends on thefigure_styleconfiguration.- arrow_sizefloat
Arrow size multiplier. Default depends on the
figure_styleconfiguration. Typical range is0.5to3.
Notes
Color parameters accept Matplotlib color formats: named colors (
"blue"), short color strings ("b"), hex strings ("#0000ff"), grayscale strings ("0.5"), and RGB/RGBA tuples with values between0and1((0, 0, 1)or(0, 0, 1, 0.5)). They may also be arrays of intensity values, which are mapped throughcolor_map.