We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3c0a50 commit eadb847Copy full SHA for eadb847
pygmt/src/subplot.py
@@ -142,7 +142,8 @@ def subplot(self, nrows=1, ncols=1, **kwargs):
142
{XY}
143
"""
144
kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access
145
- kwargs["A"] = f'"{kwargs.get("A")}"' if kwargs.get("A") else None
+ # allow for spaces in string with needing double quotes
146
+ kwargs["A"] = f'"{kwargs.get("A")}"' if kwargs.get("A") is not None else None
147
kwargs["T"] = f'"{kwargs.get("T")}"' if kwargs.get("T") else None
148
149
with Session() as lib:
@@ -205,7 +206,8 @@ def set_panel(self, panel=None, **kwargs):
205
206
{V}
207
208
209
210
211
# convert tuple or list to comma-separated str
212
panel = ",".join(map(str, panel)) if is_nonstr_iter(panel) else panel
213
pygmt/tests/test_subplot.py
@@ -48,12 +48,12 @@ def test_subplot_autolabel_margins_title():
48
fig_ref, fig_test = Figure(), Figure()
49
kwargs = dict(nrows=2, ncols=1, figsize=("15c", "6c"))
50
51
- with fig_ref.subplot(A="(1)", M="0.3c/0.1c", T="Subplot Title", **kwargs):
+ with fig_ref.subplot(A="a)", M="0.3c/0.1c", T="Subplot Title", **kwargs):
52
fig_ref.basemap(region=[0, 1, 2, 3], frame="WSne", c="0,0")
53
fig_ref.basemap(region=[4, 5, 6, 7], frame="WSne", c="1,0")
54
55
with fig_test.subplot(
56
- autolabel="(1)", margins=["0.3c", "0.1c"], title="Subplot Title", **kwargs
+ autolabel=True, margins=["0.3c", "0.1c"], title="Subplot Title", **kwargs
57
):
58
fig_test.basemap(region=[0, 1, 2, 3], frame="WSne", panel=[0, 0])
59
fig_test.basemap(region=[4, 5, 6, 7], frame="WSne", panel=[1, 0])
0 commit comments