Skip to content

Commit 3edb1ee

Browse files
committed
Also simplify the handling of 'panel' in subplot
1 parent ea046d2 commit 3edb1ee

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pygmt/src/subplot.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from pygmt.helpers import (
99
build_arg_string,
1010
fmt_docstring,
11-
is_nonstr_iter,
1211
kwargs_to_strings,
1312
use_alias,
1413
)
@@ -172,6 +171,7 @@ def subplot(self, nrows=1, ncols=1, **kwargs):
172171
@fmt_docstring
173172
@contextlib.contextmanager
174173
@use_alias(A="fixedlabel", C="clearance", V="verbose")
174+
@kwargs_to_strings(panel="sequence_comma")
175175
def set_panel(self, panel=None, **kwargs):
176176
r"""
177177
Set the current subplot panel to plot on.
@@ -221,8 +221,6 @@ def set_panel(self, panel=None, **kwargs):
221221
{verbose}
222222
"""
223223
kwargs = self._preprocess(**kwargs)
224-
# convert tuple or list to comma-separated str
225-
panel = ",".join(map(str, panel)) if is_nonstr_iter(panel) else panel
226224

227225
with Session() as lib:
228226
arg_str = " ".join(["set", f"{panel}", build_arg_string(kwargs)])

0 commit comments

Comments
 (0)