Skip to content

Commit 036e2b0

Browse files
authored
Clarify that the "color" parameter in plot/plot3d can be 1d array (#1260)
1 parent 4777a6f commit 036e2b0

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

pygmt/helpers/decorators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
(e.g., *color1*,\ *color2*,\ *color3*) to build a linear continuous
3838
CPT from those colors automatically.""",
3939
"G": """\
40-
color : str
40+
color : str or 1d array
4141
Select color or pattern for filling of symbols or polygons. Default
4242
is no fill.""",
4343
"V": """\

pygmt/src/plot.py

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ def plot(self, x=None, y=None, data=None, size=None, direction=None, **kwargs):
146146
the coordinates of a *refpoint* which will serve as a fixed external
147147
reference point for all groups.
148148
{G}
149+
*color* can be a 1d array, but it is only valid if using ``x``/``y``
150+
and ``cmap=True`` is also required.
149151
intensity : float or bool or 1d array
150152
Provide an *intensity* value (nominally in the -1 to +1 range) to
151153
modulate the fill color by simulating illumination. If using

pygmt/src/plot3d.py

+2
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ def plot3d(
113113
Offset the plot symbol or line locations by the given amounts
114114
*dx*/*dy*\ [/*dz*] [Default is no offset].
115115
{G}
116+
*color* can be a 1d array, but it is only valid if using ``x``/``y``
117+
and ``cmap=True`` is also required.
116118
intensity : float or bool or 1d array
117119
Provide an *intensity* value (nominally in the -1 to +1 range) to
118120
modulate the fill color by simulating illumination. If using

0 commit comments

Comments
 (0)