calamari.style.panel_labels#

calamari.style.panel_labels(axes, *, loc=(0.03, 0.96), fmt='({})', start='a', **text_kwargs)#

Letter a figure’s panels (a), (b), … in axes coordinates.

Both APS and IOP want multi-part figures labelled by a lower-case letter in parentheses; this puts one in each panel’s top-left corner, at the lettering size, and returns the Text artists so a caller can move or restyle one. axes may be a single Axes, a list, or the array plt.subplots returns (flattened in C order, so a 2x2 grid reads a, b across the top row).

Parameters:
  • axes (Sequence[Axes] | Any) – The panels, in labelling order.

  • loc (tuple[float, float]) – Position in axes fraction; default just inside the top-left.

  • fmt (str) – Format with one {} for the letter.

  • start (str) – First letter.

  • **text_kwargs (Any) – Forwarded to Axes.text (color='white' over a dark map).

Return type:

list[Any]