glacier_lengths.plotting module

Auxiliary plotting functions.

glacier_lengths.plotting.plot_centerlines(centerlines: Union[shapely.geometry.LineString, shapely.geometry.MultiLineString], glacier_outline: Optional[Union[shapely.geometry.Polygon, shapely.geometry.MultiPolygon]] = None, plt_ax: Optional[plt.Axes] = None, centerline_kwargs: dict[str, Any] = None, outline_kwargs: dict[str, Any] = None) None[source]

Plot glacier centerlines.

plt.show() or similar has to be run to display the figure.

Parameters
  • centerlines – One or multiple glacier centrelines.

  • glacier_outline – Optional. Glacier outline to give the centerlines context.

  • plt_ax – Optional. A matplotlib axis to draw on. Defaults to the current axis.

  • centerline_kwargs – Optional. Keyword arguments to supply the centerline matplotlib plot() call.

  • outline_kwargs – Optional. Keyword arguments to supply the outline matplotlib plot() call.

glacier_lengths.plotting.plot_length_change(dates: list[Union[datetime, float]], lengths: list[np.ndarray], plt_ax: Optional[plt.Axes] = None) None[source]

Plot length change as boxplots with associated errors.

len(dates) have to be equal to len(lengths)

Parameters
  • dates – The dates of the length measurements.

  • lengths – A list of length measurements (one array per date).

  • plt_ax – Optional. A matplotlib axis to draw on. Defaults to the current axis.