diff --git a/pygmt/src/colorbar.py b/pygmt/src/colorbar.py index 3e7efb32984..b6705aa88b1 100644 --- a/pygmt/src/colorbar.py +++ b/pygmt/src/colorbar.py @@ -80,7 +80,7 @@ def colorbar( # noqa: PLR0913 [**+w**\ *length*\ [/\ *width*]]\ [**+e**\ [**b**\|\ **f**][*length*]]\ [**+h**\|\ **v**][**+j**\ *justify*]\ [**+m**\ [**a**\|\ **c**\|\ **l**\|\ **u**]]\ - [**+n**\ [*txt*]][**+o**\ *dx*\ [/*dy*]]. + [**+n**\ [*text*]][**+o**\ *dx*\ [/*dy*]]. Define the reference point on the map for the color scale using one of four coordinate systems: (1) Use **g** for map (user) coordinates, (2) use **j** or **J** for setting *refpoint* via a @@ -91,12 +91,31 @@ def colorbar( # noqa: PLR0913 ``region`` and ``projection`` to be specified. Append **+w** followed by the length and width of the colorbar. If width is not specified then it is set to 4% of the given length. Give a negative length to - reverse the scale bar. Append **+h** to get a horizontal scale - [Default is vertical (**+v**)]. By default, the anchor point on the - scale is assumed to be the bottom left corner (**BL**), but this can - be changed by appending **+j** followed by a + reverse the scale bar. Append **+e** to add sidebar triangles for + back- and/or foreground colors. Append **f** (foreground) or **b** + (background) for only one sidebar triangle [Default gives both]. + Optionally, append triangle *length* [Default is half the barwidth]. + The back and/or foreground colors are taken from your B and F colors + in your CPT. If none then the system default colors for B and F are + used instead (:gmt-term:`COLOR_BACKGROUND` and + :gmt-term:`COLOR_FOREGROUND`). Append **+h** to get a horizontal + scale [Default is vertical (**+v**)]. By default, the anchor point on + the scale is assumed to be the bottom left corner (**BL**), but this + can be changed by appending **+j** followed by a :doc:`2-character justification code ` - *justify*. + *justify*. Append **+m** to move text to opposite side as per arguments + [**a**\|\ **c**\|\ **l**\|\ **u**]. Horizontal scale bars: Move annotations and + labels above the scale bar [Default is below]; the unit remains on the + left. Vertical scale bars: Move annotations and labels to the left of + the scale bar [Default is to the right]; the unit remains below. + Append one or more of **a**, **l** or **u** to control which of + the annotations, label, and unit that will be moved to the opposite + side. Append **c** if you want to print a vertical label as a column + of characters (does not work with special characters). + Append **+n** to plot a rectangle with the NaN color (via the **N** + entry in your cpt (or :gmt-term:`COLOR_NAN` if no such entry) at the + start of the bar, append *text* to change label from NaN. To place it + at the end of the bar, use **+N** instead. box Draw a background box behind the colorbar. If set to ``True``, a simple rectangular box is drawn using :gmt-term:`MAP_FRAME_PEN`. To customize the box