1010from pygmt .alias import Alias , AliasSystem
1111from pygmt .clib import Session
1212from pygmt .exceptions import GMTParameterError , GMTValueError
13- from pygmt .helpers import build_arg_list , fmt_docstring , kwargs_to_strings , use_alias
13+ from pygmt .helpers import (
14+ build_arg_list ,
15+ deprecate_parameter ,
16+ fmt_docstring ,
17+ kwargs_to_strings ,
18+ use_alias ,
19+ )
1420from pygmt .params import Box , Position
1521from pygmt .src ._common import _parse_position
1622
@@ -352,10 +358,13 @@ def subplot( # noqa: PLR0913
352358
353359@fmt_docstring
354360@contextlib .contextmanager
355- @use_alias (A = "fixedlabel" , C = "clearance" )
361+ # TODO(PyGMT>=0.23.0): Remove the deprecated 'fixedlabel' parameter.
362+ @deprecate_parameter ("fixedlabel" , "tag" , "v0.19.0" , remove_version = "v0.23.0" )
363+ @use_alias (C = "clearance" )
356364def set_panel (
357365 self ,
358366 panel : int | Sequence [int ] | None = None ,
367+ tag : str | None = None ,
359368 verbose : Literal ["quiet" , "error" , "warning" , "timing" , "info" , "compat" , "debug" ]
360369 | bool = False ,
361370 ** kwargs ,
@@ -372,6 +381,7 @@ def set_panel(
372381 ``projection="X"`` will fill the subplot by using unequal scales].
373382
374383 $aliases
384+ - A = tag
375385 - V = verbose
376386
377387 Parameters
@@ -386,13 +396,10 @@ def set_panel(
386396 GMT maintains information about the current figure and subplot. Also, you may
387397 give the one-dimensional *index* instead which starts at 0 and follows the row
388398 or column order set via ``autolabel`` in :meth:`pygmt.Figure.subplot`.
389-
390- fixedlabel : str
391- Overrides the automatic labeling with the given string. No modifiers
392- are allowed. Placement, justification, etc. are all inherited from how
393- ``autolabel`` was specified by the initial :meth:`pygmt.Figure.subplot`
394- command.
395-
399+ tag
400+ Tag for the current subplot. It overrides the automatic tag set by the
401+ :meth:`pygmt.Figure.subplot` method. Use ``tag="-"`` to skip the tag for this
402+ panel.
396403 clearance : str or list
397404 [*side*]\ *clearance*.
398405 Reserve a space of dimension *clearance* between the margin and the
@@ -409,9 +416,7 @@ def set_panel(
409416 """
410417 self ._activate_figure ()
411418
412- aliasdict = AliasSystem ().add_common (
413- V = verbose ,
414- )
419+ aliasdict = AliasSystem (A = Alias (tag , name = "tag" )).add_common (V = verbose )
415420 aliasdict .merge (kwargs )
416421
417422 with Session () as lib :
0 commit comments