6
6
from pygmt .helpers import (
7
7
build_arg_string ,
8
8
data_kind ,
9
+ deprecate_parameter ,
9
10
fmt_docstring ,
10
11
is_nonstr_iter ,
11
12
kwargs_to_strings ,
15
16
16
17
17
18
@fmt_docstring
19
+ @deprecate_parameter ("color" , "fill" , "v0.8.0" , "v0.12.0" )
18
20
@use_alias (
19
21
A = "straight_line" ,
20
22
B = "frame" ,
21
23
C = "cmap" ,
22
24
D = "offset" ,
23
- G = "color " ,
25
+ G = "fill " ,
24
26
I = "intensity" ,
25
27
J = "projection" ,
26
28
Jz = "zscale" ,
@@ -61,7 +63,7 @@ def plot3d(
61
63
62
64
Must provide either ``data`` or ``x``/``y``/``z``.
63
65
64
- If providing data through ``x/y/z``, ``color `` can be a 1d array
66
+ If providing data through ``x/y/z``, ``fill `` can be a 1d array
65
67
that will be mapped to a colormap.
66
68
67
69
If a symbol is selected and no symbol size given, then plot3d will
@@ -70,8 +72,8 @@ def plot3d(
70
72
symbol code (see ``style`` below) must be present as last column in the
71
73
input. If ``style`` is not used, a line connecting the data points will
72
74
be drawn instead. To explicitly close polygons, use ``close``. Select a
73
- fill with ``color ``. If ``color `` is set, ``pen`` will control whether the
74
- polygon outline is drawn or not. If a symbol is selected, ``color `` and
75
+ fill with ``fill ``. If ``fill `` is set, ``pen`` will control whether the
76
+ polygon outline is drawn or not. If a symbol is selected, ``fill `` and
75
77
``pen`` determines the fill and outline/no outline, respectively.
76
78
77
79
Full option list at :gmt-docs:`plot3d.html`
@@ -83,7 +85,7 @@ def plot3d(
83
85
data : str or {table-like}
84
86
Either a data file name, a 2d {table-classes}.
85
87
Optionally, use parameter ``incols`` to specify which columns are x, y,
86
- z, color , and size, respectively.
88
+ z, fill , and size, respectively.
87
89
x/y/z : float or 1d arrays
88
90
The x, y, and z coordinates, or arrays of x, y and z coordinates of
89
91
the data points
@@ -117,8 +119,8 @@ def plot3d(
117
119
*dx*/*dy*\ [/*dz*].
118
120
Offset the plot symbol or line locations by the given amounts
119
121
*dx*/*dy*\ [/*dz*] [Default is no offset].
120
- {color }
121
- *color * can be a 1d array, but it is only valid if using ``x``/``y``
122
+ {fill }
123
+ *fill * can be a 1d array, but it is only valid if using ``x``/``y``
122
124
and ``cmap=True`` is also required.
123
125
intensity : float or bool or 1d array
124
126
Provide an *intensity* value (nominally in the -1 to +1 range) to
@@ -158,11 +160,11 @@ def plot3d(
158
160
zvalue : str
159
161
*value*\|\ *file*.
160
162
Instead of specifying a symbol or polygon fill and outline color
161
- via ``color `` and ``pen``, give both a *value* via **zvalue** and a
163
+ via ``fill `` and ``pen``, give both a *value* via **zvalue** and a
162
164
color lookup table via ``cmap``. Alternatively, give the name of a
163
165
*file* with one z-value (read from the last column) for each
164
166
polygon in the input data. To apply it to the fill color, use
165
- ``color ="+z"``. To apply it to the pen color, append **+z** to
167
+ ``fill ="+z"``. To apply it to the pen color, append **+z** to
166
168
``pen``.
167
169
{aspatial}
168
170
{binary}
@@ -208,7 +210,7 @@ def plot3d(
208
210
if kwargs .get ("G" ) is not None and is_nonstr_iter (kwargs ["G" ]):
209
211
if kind != "vectors" :
210
212
raise GMTInvalidInput (
211
- "Can't use arrays for color if data is matrix or file."
213
+ "Can't use arrays for fill if data is matrix or file."
212
214
)
213
215
extra_arrays .append (kwargs ["G" ])
214
216
del kwargs ["G" ]
0 commit comments