rstoolbox.utils.edit_legend_text

rstoolbox.utils.edit_legend_text(ax, labels, title=None)

Change the labels and title of a legend.

Parameters:
  • ax (Axes) – Target plot axis.
  • labels (list() of str) – List of new labels to add (in the required order)
Raises:
IndexError:If the number of new labels do not match the current number of labels.