environmentaltools.graphics.boxplot

environmentaltools.graphics.boxplot(data: DataFrame, variable: str, ax=None, file_name: str = None)[source]

Draw monthly box plot of variable.

Creates box plots showing the distribution of a variable across calendar months.

Parameters:
  • data (pd.DataFrame) – Time series with datetime index.

  • variable (str) – Name of the variable column to plot.

  • ax (matplotlib.axes.Axes, optional) – Axis for the plot. Creates new if None. Defaults to None.

  • file_name (str, optional) – File path to save the plot. If None, displays interactively. Defaults to None.

Returns:

The axis with the plot.

Return type:

matplotlib.axes.Axes