Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions docs/subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ug_intro>`, 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 <ug_intro>`,
# 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 <ug_format>`
Expand Down
3 changes: 1 addition & 2 deletions ultraplot/axes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down