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/latest/lib/python3.11/site-packages/matplotlib/patches.py'>], rotation: ~typing.Union[~typing.Literal['horizontal', 'vertical'], str] = "vertical", text_size: float = 10, offset: ~typing.Optional[ArrayLike] = 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/latest/lib/python3.11/site-packages/matplotlib/patches.py'>]) – Rectangles to used to set the labels value and position.

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

  • text_size (float) – Labels text size.

  • offset (Optional[ArrayLike]) – 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