Skip to content

box

AeroViz.plot.box.box

box(df: DataFrame, x: str, y: str, x_bins: list | ndarray = None, add_scatter: bool = True, ax: Axes | None = None, **kwargs) -> tuple[Figure, Axes]

Grouped box plot of y against x.

Two modes, chosen automatically:

  • Categorical — when x is non-numeric (e.g. a 'season' column) or x_bins is omitted: one box per unique x value.
  • Binned — when x is numeric and x_bins is given: x is cut into the supplied bin edges (any width, integer or float) and one box is drawn per bin.