diff --git a/docs/subplots.py b/docs/subplots.py index 4cdb36745..332890549 100644 --- a/docs/subplots.py +++ b/docs/subplots.py @@ -45,18 +45,19 @@ # A-b-c labels # ------------ # -# UltraPlot can quickly add "a-b-c" labels using the -# :func:`~ultraplot.axes.Axes.number` assigned to each subplot. -# If you add subplots one-by-one with :func:`~ultraplot.figure.Figure.add_subplot`, you can -# manually specify the number with the `number` keyword. By default, the subplot number -# is incremented by ``1`` each time you call :func:`~ultraplot.figure.Figure.add_subplot`. +# UltraPlot can quickly add labels to subplots using the `abc` parameter. This parameter +# can be a template (with a letter "a" or "A") used to format the subplot labels, such as "A.", which assigns +# an alphabetic label based on the axis number. Alternatively, you can pass a list to +# the `abc` parameter, where the list elements are mapped as labels for the subplots one by one. +# If you add subplots one-by-one with :func:`~ultraplot.figure.Figure.add_subplot`, +# you can manually specify the number with the `number` keyword. By default, the subplot +# number is incremented by ``1`` each time you call :func:`~ultraplot.figure.Figure.add_subplot`. # If you draw all of your subplots at once with :func:`~ultraplot.figure.Figure.add_subplots`, -# the numbers depend on the input arguments. If you -# :ref:`passed an array `, the subplot numbers correspond to the numbers -# in the array. But if you used the `ncols` and `nrows` keyword arguments, the -# number order is row-major by default and can be switched to column-major by -# passing ``order='F'`` (note the number order also determines the list order in the -# :class:`~ultraplot.gridspec.SubplotGrid` returned by :func:`~ultraplot.figure.Figure.add_subplots`). +# the numbers depend on the input arguments. If you :ref:`passed an array `, +# the subplot numbers correspond to the numbers in the array. But if you used the `ncols` +# and `nrows` keyword arguments, the number order is row-major by default and can be switched +# to column-major by passing ``order='F'`` (note the number order also determines the list order +# in the :class:`~ultraplot.gridspec.SubplotGrid` returned by :func:`~ultraplot.figure.Figure.add_subplots`). # # To turn on "a-b-c" labels, set :rcraw:`abc` to ``True`` or pass ``abc=True`` # to :func:`~ultraplot.axes.Axes.format` (see :ref:`the format command ` diff --git a/ultraplot/axes/base.py b/ultraplot/axes/base.py index 07dc0a2e1..22e489d18 100644 --- a/ultraplot/axes/base.py +++ b/ultraplot/axes/base.py @@ -308,8 +308,7 @@ ``'a'`` is used. The ``a`` or ``A`` is replaced with the alphabetic character matching the `~Axes.number`. If `~Axes.number` is greater than 26, the characters loop around to a, ..., z, aa, ..., zz, aaa, ..., zzz, etc. - Can also be a sequence of strings, in which case the "a-b-c" label - will simply be selected from the sequence according to `~Axes.number`. + Can also be a sequence of strings, in which case the "a-b-c" label will be selected sequentially from the list. For example `axs.format(abc = ["X", "Y"])` for a two-panel figure, and `axes[3:5].format(abc = ["X", "Y"])` for a two-panel subset of a larger figure. abcloc, titleloc : str, default: :rc:`abc.loc`, :rc:`title.loc` Strings indicating the location for the a-b-c label and main title. The following locations are valid: