diff --git a/pygmt/src/plot.py b/pygmt/src/plot.py index 1cad190c8ee..2767da138d2 100644 --- a/pygmt/src/plot.py +++ b/pygmt/src/plot.py @@ -213,7 +213,8 @@ def plot( if kind == "empty": # Add more columns for vectors input # Parameters for vector styles if ( - kwargs.get("S") is not None + isinstance(kwargs.get("S"), str) + and len(kwargs["S"]) >= 1 and kwargs["S"][0] in "vV" and is_nonstr_iter(direction) ): diff --git a/pygmt/src/plot3d.py b/pygmt/src/plot3d.py index 60dac2d5d37..3a070a53b52 100644 --- a/pygmt/src/plot3d.py +++ b/pygmt/src/plot3d.py @@ -197,7 +197,8 @@ def plot3d( if kind == "empty": # Add more columns for vectors input # Parameters for vector styles if ( - kwargs.get("S") is not None + isinstance(kwargs.get("S"), str) + and len(kwargs["S"]) >= 1 and kwargs["S"][0] in "vV" and is_nonstr_iter(direction) ):