graphinglib.SmartFigure.set_reference_labels_params#

SmartFigure.set_reference_labels_params(reset: bool = False, color: str | Inherit | None = None, start_index: int | None = None, font_size: float | Inherit | None = None, font_weight: str | Inherit | None = None, format: Callable = None) Self[source]#

Sets advanced parameters for the reference labels that can be added to the subplots.

Parameters:
resetbool, optional

If True, resets all previously set reference label parameters to their default values before applying the new parameters. Defaults to False.

colorstr | Inherit, optional

The color of the reference labels. If "default", the color is set according to the text color of other text in the figure.

start_indexint, optional

Starting index for the reference labels. This allows to customize the starting label, for example, to start labeling from “b)” instead of “a)” by giving start_index = 1.

font_sizefloat | Inherit, optional

The font size of the reference labels. Typical range is 8 to 20.

font_weightstr | Inherit, optional

The font weight of the reference labels. Values include "normal", "bold", "light", "ultralight", "heavy", and "black".

formatCallable, optional

A callable function to format the reference labels. By default, the reference labels are formatted as a), b), etc. The function must take a single str argument (the letter) and return a formatted str. For example, to have the reference labels in uppercase and in parentheses, the format could be defined as follows:

format = lambda label: f"({label.upper()})"
Returns:
Self

For convenience, the same SmartFigure with the updated reference labels parameters.

Notes

Color parameters accept Matplotlib color formats: named colors ("blue"), short color strings ("b"), hex strings ("#0000ff"), grayscale strings ("0.5"), and RGB/RGBA tuples with values between 0 and 1 ((0, 0, 1) or (0, 0, 1, 0.5)).