1111
1212
1313@fmt_docstring
14- @use_alias (
15- L = "map_scale" ,
16- F = "box" ,
17- Td = "rose" ,
18- Tm = "compass" ,
19- f = "coltypes" ,
20- )
21- def basemap (
14+ @use_alias (F = "box" , Td = "rose" , Tm = "compass" , f = "coltypes" )
15+ def basemap ( # noqa: PLR0913
2216 self ,
2317 projection : str | None = None ,
2418 zsize : float | str | None = None ,
2519 zscale : float | str | None = None ,
2620 frame : str | Sequence [str ] | bool = False ,
2721 region : Sequence [float | str ] | str | None = None ,
22+ map_scale : str | None = None ,
2823 verbose : Literal ["quiet" , "error" , "warning" , "timing" , "info" , "compat" , "debug" ]
2924 | bool = False ,
3025 panel : int | Sequence [int ] | bool = False ,
@@ -35,13 +30,16 @@ def basemap(
3530 r"""
3631 Plot base maps and frames.
3732
38- Creates a basic or fancy basemap with axes, fill, and titles. Several
39- map projections are available, and the user may specify separate
40- tick-mark intervals for boundary annotation, ticking, and [optionally]
41- gridlines. A simple map scale or directional rose may also be plotted.
33+ Creates a basic or fancy basemap with axes, fill, and titles. Several map
34+ projections are available, and the user may specify separate tick-mark intervals for
35+ boundary annotation, ticking, and [optionally] gridlines.
4236
43- At least one of the parameters ``frame``, ``map_scale``, ``rose``, or
44- ``compass`` must be specified if not in subplot mode.
37+ At least one of the parameters ``frame``, ``map_scale``, ``rose``, or ``compass``
38+ must be specified if not in subplot mode.
39+
40+ See also the following methods that wraps the GMT's ``basemap`` module:
41+
42+ - :meth:`pygmt.Figure.scalebar`: Add a scale bar on the plot.
4543
4644 Full GMT docs at :gmt-docs:`basemap.html`.
4745
@@ -50,6 +48,7 @@ def basemap(
5048 - J = projection
5149 - Jz = zscale
5250 - JZ = zsize
51+ - L = map_scale
5352 - R = region
5453 - V = verbose
5554 - c = panel
@@ -64,10 +63,13 @@ def basemap(
6463 $region
6564 *Required if this is the first plot command.*
6665 $frame
67- map_scale : str
68- [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
69- **+w**\ *length*.
66+ map_scale
7067 Draw a simple map scale centered on the reference point specified.
68+
69+ .. deprecated:: v0.19.0
70+
71+ Recommended to use :meth:`pygmt.Figure.scalebar` instead.
72+
7173 box : bool or str
7274 [**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\ *pen*]]\
7375 [**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]].
@@ -103,6 +105,7 @@ def basemap(
103105 aliasdict = AliasSystem (
104106 Jz = Alias (zscale , name = "zscale" ),
105107 JZ = Alias (zsize , name = "zsize" ),
108+ L = Alias (map_scale , name = "map_scale" ), # Deprecated.
106109 ).add_common (
107110 B = frame ,
108111 J = projection ,
0 commit comments