GeezerVison is showing github.com — Rename scale_at to scale_loc · GenericMappingTools/pygmt@0561ba4
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: pygmt/src/scalebar.py +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -21,7 +21,7 @@ def scalebar( # noqa: PLR0913 | 21 | 21 | length: float | str, | 22 | 22 | height: float | str | None = None, | 23 | 23 | position: Position | Sequence[float | str] | AnchorCode | None = None, | 24 | | - scale_at: float | Sequence[float] | bool = False, | | 24 | + scale_loc: float | Sequence[float] | bool = False, | 25 | 25 | label: str | bool = False, | 26 | 26 | label_alignment: Literal["left", "right", "top", "bottom"] | None = None, | 27 | 27 | unit: bool = False, | @@ -57,7 +57,7 @@ def scalebar( # noqa: PLR0913 | 57 | 57 |
| 58 | 58 | If not specified, defaults to the Bottom Left corner of the plot with a 0.2-cm | 59 | 59 | and 0.4-cm offset in the x- and y-directions, respectively. | 60 | | - scale_at | | 60 | + scale_loc | 61 | 61 | Specify the location where the map scale is calculated. It can be: | 62 | 62 |
| 63 | 63 | - *slat*: Map scale is calculated for latitude *slat*. | @@ -122,7 +122,7 @@ def scalebar( # noqa: PLR0913 | 122 | 122 | prefix="+a", | 123 | 123 | mapping={"left": "l", "right": "r", "top": "t", "bottom": "b"}, | 124 | 124 | ), | 125 | | - Alias(scale_at, name="scale_at", prefix="+c", sep="/", size=2), | | 125 | + Alias(scale_loc, name="scale_loc", prefix="+c", sep="/", size=2), | 126 | 126 | Alias(fancy, name="fancy", prefix="+f"), | 127 | 127 | Alias(label, name="label", prefix="+l"), | 128 | 128 | Alias(unit, name="unit", prefix="+u"), | |
Collapse file Copy file name to clipboardExpand all lines: pygmt/tests/test_scalebar.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -32,7 +32,7 @@ def test_scalebar_complete(): | 32 | 32 | fancy=True, | 33 | 33 | label="Scale", | 34 | 34 | label_alignment="left", | 35 | | - scale_at=(110, 25), | | 35 | + scale_loc=(110, 25), | 36 | 36 | unit=True, | 37 | 37 | box=True, | 38 | 38 | ) | |
|