easyclimate.plot.line

Bar plot for xarray dataset

Functions

line_plot_with_threshold(→ tuple)

Plot a line chart with proper shading at threshold crossings.

Module Contents

easyclimate.plot.line.line_plot_with_threshold(da: xarray.DataArray, threshold: float = 0, pos_color: str = 'red', neg_color: str = 'blue', ax=None, line_plot: bool = True, fill_pos_plot: bool = True, fill_neg_plot: bool = True, line_kwargs=None, fill_kwargs=None) tuple

Plot a line chart with proper shading at threshold crossings.

Parameters:

daxarray.DataArray

1-dimensional data array

thresholdfloat, optional

Color separation threshold (default: 0)

pos_colorstr, optional

Color for values ≥ threshold (default: ‘red’)

neg_colorstr, optional

Color for values < threshold (default: ‘blue’)

axmatplotlib axes, optional

Axes to plot on (default: current axes)

line_kwargsdict, optional

Arguments for plt.plot

fill_kwargsdict, optional

Arguments for plt.fill_between

Returns:

tuple

(line plot, fill objects)

See also

matplotlib.lines.Line2D