Skip to content

Commit

Permalink
Allow non-string color when input data is a matrix or a file for plot…
Browse files Browse the repository at this point in the history
… and plot3d
  • Loading branch information
seisman committed Sep 19, 2021
1 parent f7d5526 commit 3aaccd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pygmt/src/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def plot(self, x=None, y=None, data=None, size=None, direction=None, **kwargs):
kwargs["S"] = "s0.2c"
except FileNotFoundError:
pass
if "G" in kwargs and not isinstance(kwargs["G"], str):
if "G" in kwargs and is_nonstr_iter(kwargs["G"]):
if kind != "vectors":
raise GMTInvalidInput(
"Can't use arrays for color if data is matrix or file."
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/plot3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def plot3d(
kwargs["S"] = "u0.2c"
except FileNotFoundError:
pass
if "G" in kwargs and not isinstance(kwargs["G"], str):
if "G" in kwargs and is_nonstr_iter(kwargs["G"]):
if kind != "vectors":
raise GMTInvalidInput(
"Can't use arrays for color if data is matrix or file."
Expand Down

0 comments on commit 3aaccd9

Please sign in to comment.