colour.plotting.label_rectangles#

colour.plotting.label_rectangles(labels: Sequence[str], rectangles: Sequence[Patch], rotation: Literal['horizontal', 'vertical'] | str = 'vertical', text_size: float = CONSTANTS_COLOUR_STYLE.font.scaling.medium, offset: ArrayLike | None = None, **kwargs: Any) Tuple[Figure, Axes][source]#

Add labels above given rectangles.

Parameters:
  • labels (Sequence[str]) – Labels to display.

  • rectangles (Sequence[Patch]) – Rectangles to used to set the labels value and position.

  • rotation (Literal['horizontal', 'vertical'] | str) – Labels orientation.

  • text_size (float) – Labels text size.

  • offset (ArrayLike | None) – Labels offset as percentages of the largest rectangle dimensions.

  • figure – Figure to apply the render elements onto.

  • axes – Axes to apply the render elements onto.

  • kwargs (Any) –

Returns:

Current figure and axes.

Return type:

tuple