|
50 | 50 | ) |
51 | 51 | @kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence") |
52 | 52 | def plot3d( |
53 | | - self, data=None, x=None, y=None, z=None, size=None, direction=None, **kwargs |
| 53 | + self, |
| 54 | + data=None, |
| 55 | + x=None, |
| 56 | + y=None, |
| 57 | + z=None, |
| 58 | + size=None, |
| 59 | + symbol=None, |
| 60 | + direction=None, |
| 61 | + **kwargs, |
54 | 62 | ): |
55 | 63 | r""" |
56 | 64 | Plot lines, polygons, and symbols in 3-D. |
@@ -89,6 +97,8 @@ def plot3d( |
89 | 97 | size : 1-D array |
90 | 98 | The size of the data points in units specified in ``style``. |
91 | 99 | Only valid if using ``x``/``y``/``z``. |
| 100 | + symbol : 1-D array |
| 101 | + The symbols of the data points. Only valid if using ``x``/``y``. |
92 | 102 | direction : list of two 1-D arrays |
93 | 103 | If plotting vectors (using ``style="V"`` or ``style="v"``), then |
94 | 104 | should be a list of two 1-D arrays with the vector directions. These |
@@ -204,13 +214,19 @@ def plot3d( |
204 | 214 | if is_nonstr_iter(kwargs.get(flag)): |
205 | 215 | extra_arrays.append(kwargs.get(flag)) |
206 | 216 | kwargs[flag] = "" |
| 217 | + # Symbol must be at the last column |
| 218 | + if is_nonstr_iter(symbol): |
| 219 | + if "S" not in kwargs: |
| 220 | + kwargs["S"] = True |
| 221 | + extra_arrays.append(symbol) |
207 | 222 | else: |
208 | 223 | for name, value in [ |
209 | 224 | ("direction", direction), |
210 | 225 | ("fill", kwargs.get("G")), |
211 | 226 | ("size", size), |
212 | 227 | ("intensity", kwargs.get("I")), |
213 | 228 | ("transparency", kwargs.get("t")), |
| 229 | + ("symbol", symbol), |
214 | 230 | ]: |
215 | 231 | if is_nonstr_iter(value): |
216 | 232 | raise GMTInvalidInput(f"'{name}' can't be 1-D array if 'data' is used.") |
|
0 commit comments