10
10
@use_alias (
11
11
A = "transparency" ,
12
12
C = "cmap" ,
13
+ D = "background" ,
13
14
F = "color_model" ,
14
15
G = "truncate" ,
15
16
H = "output" ,
16
17
I = "reverse" ,
18
+ M = "overrule_bg" ,
19
+ N = "no_bg" ,
17
20
Q = "log" ,
18
21
T = "series" ,
19
22
V = "verbose" ,
@@ -28,8 +31,8 @@ def makecpt(**kwargs):
28
31
This is a module that will help you make static color palette tables
29
32
(CPTs). In classic mode we write the CPT to standard output, while under
30
33
modern mode we simply save the CPT as the current session CPT (but see
31
- ** output** ). You define an equidistant set of contour intervals or pass
32
- your own z-table or list, and create a new CPT based on an existing master
34
+ *output*). You define an equidistant set of contour intervals or pass your
35
+ own z-table or list, and create a new CPT based on an existing master
33
36
(dynamic) CPT. The resulting CPT can be reversed relative to the master
34
37
cpt, and can be made continuous or discrete. For color tables beyond the
35
38
standard GMT offerings, visit
@@ -46,14 +49,14 @@ def makecpt(**kwargs):
46
49
the new master file. If not, the parameters :gmt-term:`COLOR_BACKGROUND`,
47
50
:gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN` from the
48
51
:gmt-docs:`gmt.conf <gmt.conf>` file or the command line will be used. This
49
- default behavior can be overruled using the options **-D**, **-M** or
50
- **-N* *.
52
+ default behavior can be overruled using the options *background*,
53
+ *overrule_bg* or *no_bg *.
51
54
52
55
The color model (RGB, HSV or CMYK) of the palette created by **makecpt**
53
56
will be the same as specified in the header of the master CPT. When there
54
57
is no :gmt-term:`COLOR_MODEL` entry in the master CPT, the
55
- :gmt-term:`COLOR_MODEL` specified in the :doc :`gmt.conf` file or on the
56
- command line will be used.
58
+ :gmt-term:`COLOR_MODEL` specified in the :gmt-docs :`gmt.conf <gmt.conf>`
59
+ file or on the command line will be used.
57
60
58
61
Full option list at :gmt-docs:`makecpt.html`
59
62
@@ -69,6 +72,14 @@ def makecpt(**kwargs):
69
72
Selects the master color palette table (CPT) to use in the
70
73
interpolation. Full list of built-in color palette tables can be found
71
74
at :gmt-docs:`cookbook/cpts.html#built-in-color-palette-tables-cpt`.
75
+ background : bool or str
76
+ Select the back- and foreground colors to match the colors for lowest
77
+ and highest *z*-values in the output CPT [Default (``background=True``
78
+ or ``background='o'``) uses the colors specified in the master file, or
79
+ those defined by the parameters :gmt-term:`COLOR_BACKGROUND`,
80
+ :gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN`]. Use
81
+ ``background='i'`` to match the colors for the lowest and highest
82
+ values in the input (instead of the output) CPT.
72
83
color_model :
73
84
``[R|r|h|c][+c[label]]``.
74
85
Force output CPT to be written with r/g/b codes, gray-scale values or
@@ -107,6 +118,15 @@ def makecpt(**kwargs):
107
118
happens before *truncate* and *series* values are used so the latter
108
119
must be compatible with the changed *z*-range. See also
109
120
:gmt-docs:`cookbook/features.html#manipulating-cpts`.
121
+ overrule_bg :
122
+ Overrule background, foreground, and NaN colors specified in the master
123
+ CPT with the values of the parameters :gmt-term:`COLOR_BACKGROUND`,
124
+ :gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN` specified in
125
+ the :gmt-docs:`gmt.conf <gmt.conf>` file or on the command line. When
126
+ combined with **background**, only :gmt-term:`COLOR_NAN` is considered.
127
+ no_bg : bool
128
+ Do not write out the background, foreground, and NaN-color fields
129
+ [Default will write them, i.e. ``no_bg=False``].
110
130
log : bool
111
131
For logarithmic interpolation scheme with input given as logarithms.
112
132
Expects input z-values provided via **series** to be log10(*z*),
0 commit comments