colour.plotting.label_rectangles#

colour.plotting.label_rectangles(labels: ~typing.Sequence[str], rectangles: ~typing.Sequence[<module 'matplotlib.patches' from '/home/docs/checkouts/readthedocs.org/user_builds/colour/envs/v0.4.2/lib/python3.11/site-packages/matplotlib/patches.py'>], rotation: ~typing.Literal['horizontal', 'vertical'] | str = "vertical", text_size: float = 10, offset: ArrayLike | None = None, **kwargs: ~typing.Any) Tuple[Figure, Axes][source]#

Add labels above given rectangles.

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

  • rectangles (Sequence[<module 'matplotlib.patches' from '/home/docs/checkouts/readthedocs.org/user_builds/colour/envs/v0.4.2/lib/python3.11/site-packages/matplotlib/patches.py'>]) – 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