Skip to content

Commit

Permalink
Fix the weird codes in text
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Mar 26, 2021
1 parent a9d167d commit aac61c2
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions pygmt/src/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,23 @@ def text_(
)
):
kwargs.update({"F": ""})
if angle is not None and isinstance(angle, (int, float, str)):

if angle is True:
kwargs["F"] += "+a"
elif isinstance(angle, (int, float, str)):
kwargs["F"] += f"+a{str(angle)}"
if font is not None and isinstance(font, str):

if font is True:
kwargs["F"] += "+f"
elif isinstance(font, str):
kwargs["F"] += f"+f{font}"
if justify is not None and isinstance(justify, str):

if justify is True:
kwargs["F"] += "+j"
elif isinstance(justify, str):
kwargs["F"] += f"+j{justify}"
if position is not None and isinstance(position, str):

if isinstance(position, str):
kwargs["F"] += f'+c{position}+t"{text}"'

extra_arrays = []
Expand Down

0 comments on commit aac61c2

Please sign in to comment.