Skip to content

Commit a9d167d

Browse files
committed
Fix the weird codes in subplot autolabel
See 4126c16 and eadb847
1 parent 59a2b28 commit a9d167d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pygmt/src/subplot.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ def subplot(self, nrows=1, ncols=1, **kwargs):
149149
"""
150150
kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access
151151
# allow for spaces in string with needing double quotes
152-
kwargs["A"] = f'"{kwargs.get("A")}"' if kwargs.get("A") is not None else None
152+
if isinstance(kwargs.get("A"), str):
153+
kwargs["A"] = f'"{kwargs.get("A")}"'
153154
kwargs["T"] = f'"{kwargs.get("T")}"' if kwargs.get("T") else None
154155

155156
if nrows < 1 or ncols < 1:

0 commit comments

Comments
 (0)