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 | Literal['default'] = 'default', color: str | ArrayLike | Literal['default'] = 'default', color_map: str | Colormap | Literal['default'] = 'default', arrow_size: float | Literal['default'] = 'default') 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.

line_widthfloat

Width of the stream lines. Default depends on the figure_style configuration.

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_style configuration.

color_mapstr or Colormap

Color map of the stream lines, to be used in combination with the color parameter to specify intensity. Default depends on the figure_style configuration.

arrow_sizefloat

Arrow size multiplier. Default depends on the figure_style configuration.