Skip to content

Commit

Permalink
add if clause
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgrund committed Oct 5, 2022
1 parent 90e8ef7 commit 6faa969
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pygmt/src/ternary.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ def ternary(self, data, alabel=None, blabel=None, clabel=None, **kwargs):
"""
kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access

alabel = str(alabel) if alabel is not None else "-"
blabel = str(blabel) if blabel is not None else "-"
clabel = str(clabel) if clabel is not None else "-"
kwargs["L"] = "/".join([alabel, blabel, clabel])
if alabel or blabel or clabel:
alabel = str(alabel) if alabel is not None else "-"
blabel = str(blabel) if blabel is not None else "-"
clabel = str(clabel) if clabel is not None else "-"
kwargs["L"] = "/".join([alabel, blabel, clabel])

with Session() as lib:
file_context = lib.virtualfile_from_data(check_kind="vector", data=data)
Expand Down

0 comments on commit 6faa969

Please sign in to comment.