Skip to content

Commit 763dc07

Browse files
authored
Figure.plot/Figure.plot3d: Improve the check of the "style" parameter for "v" or "V" (#3603)
1 parent ff9daae commit 763dc07

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pygmt/src/plot.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ def plot(
213213
if kind == "empty": # Add more columns for vectors input
214214
# Parameters for vector styles
215215
if (
216-
kwargs.get("S") is not None
216+
isinstance(kwargs.get("S"), str)
217+
and len(kwargs["S"]) >= 1
217218
and kwargs["S"][0] in "vV"
218219
and is_nonstr_iter(direction)
219220
):

pygmt/src/plot3d.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ def plot3d(
197197
if kind == "empty": # Add more columns for vectors input
198198
# Parameters for vector styles
199199
if (
200-
kwargs.get("S") is not None
200+
isinstance(kwargs.get("S"), str)
201+
and len(kwargs["S"]) >= 1
201202
and kwargs["S"][0] in "vV"
202203
and is_nonstr_iter(direction)
203204
):

0 commit comments

Comments
 (0)