Skip to content

Commit 798744d

Browse files
Improve docs of "pygmt.grd2cpt" and "pygmt.makecpt" (02) (#2517)
1 parent 47674e3 commit 798744d

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

pygmt/src/grd2cpt.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ def grd2cpt(grid, **kwargs):
124124
For details on array creation, see
125125
:gmt-docs:`makecpt.html#generate-1d-array`.
126126
truncate : list or str
127-
*zlo/zhi*.
127+
*zlow/zhigh*.
128128
Truncate the incoming CPT so that the lowest and highest z-levels are
129-
to *zlo* and *zhi*. If one of these equal NaN then we leave that end of
130-
the CPT alone. The truncation takes place before any resampling. See
131-
also :gmt-docs:`cookbook/features.html#manipulating-cpts`.
129+
to *zlow* and *zhigh*. If one of these equal NaN then we leave that
130+
end of the CPT alone. The truncation takes place before any resampling.
131+
See also :gmt-docs:`cookbook/features.html#manipulating-cpts`.
132132
output : str
133133
Optional. The file name with extension .cpt to store the generated CPT
134134
file. If not given or ``False`` [Default], saves the CPT as the current

pygmt/src/makecpt.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,45 +85,45 @@ def makecpt(**kwargs):
8585
:gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN`]. Use
8686
``background="i"`` to match the colors for the lowest and highest
8787
values in the input (instead of the output) CPT.
88-
color_model :
89-
[**R**\|\ **r**\|\ **h**\|\ **c**][**+c**\ [*label*]].
88+
color_model : str
89+
[**R**\|\ **r**\|\ **h**\|\ **c**]\
90+
[**+c**\ [*label*\|\ *start*\ [**-**]]].
9091
Force output CPT to be written with r/g/b codes, gray-scale values or
9192
color name (**R**, default) or r/g/b codes only (**r**), or h-s-v codes
9293
(**h**), or c/m/y/k codes (**c**). Optionally or alternatively, append
9394
**+c** to write discrete palettes in categorical format. If *label* is
9495
appended then we create labels for each category to be used when the
9596
CPT is plotted. The *label* may be a comma-separated list of category
9697
names (you can skip a category by not giving a name), or give
97-
*start*\[**-**], where we automatically build monotonically increasing
98-
labels from *start* (a single letter or an integer). Append **-** to
99-
build ranges *start*-*start+1* instead.
98+
*start*, where we automatically build monotonically increasing
99+
labels from *start* (a single letter or an integer). Additionally
100+
append **-** to build ranges *start*-*start+1* as labels instead.
100101
series : list or str
101-
[*min/max/inc*\[**+b**\|\ **l**\|\ **n**]\|\ *file*\|\ *list*].
102+
[*min/max/inc*\ [**+b**\|\ **l**\|\ **n**]\|\ *file*\|\ *list*].
102103
Define the range of the new CPT by giving the lowest and highest
103104
z-value (and optionally an interval). If this is not given, the
104105
existing range in the master CPT will be used intact. The values
105-
produced defines the color slice boundaries. If **+n** is used it
106+
produced defines the color slice boundaries. If **+n** is used it
106107
refers to the number of such boundaries and not the number of slices.
107108
For details on array creation, see
108109
:gmt-docs:`makecpt.html#generate-1d-array`.
109110
truncate : list or str
110111
*zlow/zhigh*.
111112
Truncate the incoming CPT so that the lowest and highest z-levels are
112113
to *zlow* and *zhigh*. If one of these equal NaN then we leave that
113-
end of the CPT alone. The truncation takes place before any
114-
resampling. See
115-
also :gmt-docs:`cookbook/features.html#manipulating-cpts`.
114+
end of the CPT alone. The truncation takes place before any resampling.
115+
See also :gmt-docs:`cookbook/features.html#manipulating-cpts`.
116116
output : str
117117
Optional. The file name with extension .cpt to store the generated CPT
118118
file. If not given or ``False`` [Default], saves the CPT as the current
119119
CPT of the session, figure, subplot, panel, or inset depending on which
120120
level :func:`pygmt.makecpt` is called.
121121
reverse : str
122-
Set this to True or **c** [Default] to reverse the sense of color
123-
progression in the master CPT. Set this to z to reverse the sign of
124-
z-values in the color table. Note that this change of z-direction
122+
Set this to ``True`` or **c** [Default] to reverse the sense of color
123+
progression in the master CPT. Set this to **z** to reverse the sign
124+
of z-values in the color table. Note that this change of z-direction
125125
happens before ``truncate`` and ``series`` values are used so the
126-
latter must be compatible with the changed *z*-range. See also
126+
latter must be compatible with the changed z-range. See also
127127
:gmt-docs:`cookbook/features.html#manipulating-cpts`.
128128
overrule_bg : str
129129
Overrule background, foreground, and NaN colors specified in the master

0 commit comments

Comments
 (0)