colour.plotting.label_rectangles#
- colour.plotting.label_rectangles(labels: Sequence[str | Real], 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 specified rectangles.
- Parameters:
labels (Sequence[str | Real]) – Text labels to display above the rectangles.
rectangles (Sequence[Patch]) – Rectangle patches used to determine label positions and values.
rotation (Literal['horizontal', 'vertical'] | str) – Orientation of the labels.
text_size (float) – Font size for the labels.
offset (ArrayLike | None) – Label 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: