Closed core-man closed 3 years ago
If I understand it correctly, we only need to update the docstrings to mention that color
can be a string or a 1darray?
If I understand it correctly, we only need to update the docstrings to mention that
color
can be a string or a 1darray?
I think so. May better to add an additional note (Only valid if using x/y
) like the size
parameter for the plot
method.
sizes (1d array) – The sizes of the data points in units specified using
style
. Only valid if usingx
/y
.
Because we raise GMTInvalidInput
when color
is used with the data
parameter just like the sizes
parameter.
Sounds good. Maybe also need to mention that cmap
is required if color
is a 1darray (I don't check if it's true).
Sounds good. Maybe also need to mention that
cmap
is required ifcolor
is a 1darray (I don't check if it's true).
I think so. See GMT plot:
where the optional z is required when -C is used
@seisman
I use the above Plot data points code but remove cmap=True
. Cannot plot the symbols. So you are right.
@core-man This issue looks easy to fix. Do you want to work on it?
@core-man This issue looks easy to fix. Do you want to work on it?
So we don't want to leave it to new contributors?
So we don't want to leave it to new contributors?
The description of the issue is so long that people may be lost about what they should do.
You may either submit a quick fix or give more details about the expected changes.
Description of the problem
We need to update the documentation for the
color
parameter in plot and plot3d becausecolor
can also be1d array
(originally posted in https://github.com/GenericMappingTools/pygmt/pull/1065#issuecomment-801212175).See the description of the
color
parameter of plot:See the description of the
color
parameter of plot3d:However,
color
can also be a 1d array just like thesizes
parameter when we usex
/y
parameters for in theplot
andplot3d
methods. See the last example in Plotting data points. We can setcolor=data.depth_km
anddata.depth_km
is a 1d array.