|
48 | 48 | w="wrap", |
49 | 49 | ) |
50 | 50 | @kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence") |
51 | | -def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs): |
| 51 | +def plot( |
| 52 | + self, data=None, x=None, y=None, size=None, symbol=None, direction=None, **kwargs |
| 53 | +): |
52 | 54 | r""" |
53 | 55 | Plot lines, polygons, and symbols in 2-D. |
54 | 56 |
|
@@ -87,6 +89,8 @@ def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs): |
87 | 89 | size : 1-D array |
88 | 90 | The size of the data points in units specified using ``style``. |
89 | 91 | Only valid if using ``x``/``y``. |
| 92 | + symbol : 1-D array |
| 93 | + The symbols of the data points. Only valid if using ``x``/``y``. |
90 | 94 | direction : list of two 1-D arrays |
91 | 95 | If plotting vectors (using ``style="V"`` or ``style="v"``), then |
92 | 96 | should be a list of two 1-D arrays with the vector directions. These |
@@ -226,13 +230,19 @@ def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs): |
226 | 230 | if is_nonstr_iter(kwargs.get(flag)): |
227 | 231 | extra_arrays.append(kwargs.get(flag)) |
228 | 232 | kwargs[flag] = "" |
| 233 | + # Symbol must be at the last column |
| 234 | + if is_nonstr_iter(symbol): |
| 235 | + if "S" not in kwargs: |
| 236 | + kwargs["S"] = True |
| 237 | + extra_arrays.append(symbol) |
229 | 238 | else: |
230 | 239 | for name, value in [ |
231 | 240 | ("direction", direction), |
232 | 241 | ("fill", kwargs.get("G")), |
233 | 242 | ("size", size), |
234 | 243 | ("intensity", kwargs.get("I")), |
235 | 244 | ("transparency", kwargs.get("t")), |
| 245 | + ("symbol", symbol), |
236 | 246 | ]: |
237 | 247 | if is_nonstr_iter(value): |
238 | 248 | raise GMTInvalidInput(f"'{name}' can't be 1-D array if 'data' is used.") |
|
0 commit comments