enstools.plot.interactive_streamlines

enstools.plot.interactive_streamlines(variable_u, variable_v, lon=None, lat=None, **kwargs)

Creates a plot of interactive streamlines or vectors.

Parameters:
variable_u, variable_vxarray.DataArray

u- and v-component of streamline data.

lonxarray.DataArray or np.ndarray or str

longitude coordinate or name of longitude coordinate. The name may only be used for xarray variables.

latxarray.DataArray or np.ndarray or str

latitude coordinate or name of longitude coordinate. The name may only be used for xarray variables.

Other optional keyword arguments:
**kwargs
figure: bokeh or plotly figure object

If provided, this figure instance will be used (and returned), otherwise a new figure will be created.

selected_backendEnum element, optional, default=Library.BOKEH

Definition of a library for plotting. Element from Library Enum.

aspectfloat, optional, default=None

Aspect ratio between a figure width and a height as a fraction.

sizeint, optional, default=800

Size of a figure width in pixels. Size of a figure height is calculated from an aspectratio.

map_resolution{‘110m’, ‘50m’, ‘10m’}, optional, default=’110m’

Definition of a map resolution.

line_typeEnum element, optional, default=Stream.LINE

Definition of a line type. Element from Stream Enum.

densityfloat, optional, default=2

Definition of a closeness of streamlines. When density = 1, the domain is divided into a 30x30 grid.

scalefloat, optional, default=0.02

Possibility to scale a size of arrows(for example, to avoid overlap).

Returns:
figure

Figure object contains interactive streamlines or vectors.