add_subplot_labels

add_subplot_labels(axes: Axis | Axes, *, label_position: tuple[float, float] = (-0.05, 1.05), label_coords: SubPlotLabelCoord = 'axes fraction', direction: Literal['row', 'column'] = 'row', label_format_template: str = '{}', label_format_function: BuiltinSubPlotLabelFormatFunctionKey | Callable[[int, int | None], str] = 'number', fontsize: int = 16) None[source]

Add labels to all subplots in axes in a consistent manner.

Parameters:
  • axes (Axis | Axes) – Axes (subplots) on which the labels should be added.

  • label_position (tuple[float, float]) – Position of the label in label_coords coordinates.

  • label_coords (SubPlotLabelCoord) – Coordinate system used for label_position. Defaults to “axes fraction”

  • direction (Literal["row", "column"]) – Direct in which the axes should be iterated in. Defaults to “row”

  • label_format_template (str) – Template string to inject the return value of label_format_function into. Defaults to “{}”

  • label_format_function (BuiltinSubPlotLabelFormatFunctionKey | Callable[[int, int | None], str]) – Function to calculate the label for the axis index and axes size. Defaults to “number”

  • fontsize (int) – Font size used for the label. Defaults to 16