Skip to content

Commit

Permalink
Also simplify the handling of 'panel' in subplot
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Nov 22, 2023
1 parent ea046d2 commit 3edb1ee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pygmt/src/subplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from pygmt.helpers import (
build_arg_string,
fmt_docstring,
is_nonstr_iter,
kwargs_to_strings,
use_alias,
)
Expand Down Expand Up @@ -172,6 +171,7 @@ def subplot(self, nrows=1, ncols=1, **kwargs):
@fmt_docstring
@contextlib.contextmanager
@use_alias(A="fixedlabel", C="clearance", V="verbose")
@kwargs_to_strings(panel="sequence_comma")
def set_panel(self, panel=None, **kwargs):
r"""
Set the current subplot panel to plot on.
Expand Down Expand Up @@ -221,8 +221,6 @@ def set_panel(self, panel=None, **kwargs):
{verbose}
"""
kwargs = self._preprocess(**kwargs)
# convert tuple or list to comma-separated str
panel = ",".join(map(str, panel)) if is_nonstr_iter(panel) else panel

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

0 comments on commit 3edb1ee

Please sign in to comment.