-
Notifications
You must be signed in to change notification settings - Fork 234
Add Figure.scalebar to plot a scale bar on maps #4015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
7a276b0 to
ec9b800
Compare
2a0ea6b to
17d8427
Compare
Summary of changed imagesThis is an auto-generated report of images that have changed on the DVC remote
Image diff(s)Added images
Modified images
Report last updated at commit 3e95670 |
| self, | ||
| position: Position | None = None, | ||
| length: float | str | None = None, | ||
| scale_position: float | Sequence[float] | bool = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GMT uses loc, GMT.jl uses scale_at_lat, and PyGMT uses scale_position?
Maybe scale_location or scale_lonlat?
| length: float | str | None = None, | ||
| scale_position: float | Sequence[float] | bool = False, | ||
| label: str | bool = False, | ||
| label_alignment: Literal["left", "right", "top", "bottom"] | None = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GMT and GMT.jl use align, currently PyGMT uses label_alignment, but maybe label_position?
| scale_position: float | Sequence[float] | bool = False, | ||
| label: str | bool = False, | ||
| label_alignment: Literal["left", "right", "top", "bottom"] | None = None, | ||
| unit: bool = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GMT and GMT.jl uses units, but I feel unit makes more sense here.

GMT long names are available at: https://github.com/GenericMappingTools/gmt/blob/831be10910cb15bc6e9a0a0bf49bfd57861a3f8a/src/longopt/psbasemap_inc.h#L39
The full syntax of -L is:
Here is a comparison of names used in PyGMT, GMT, and GMT.jl:
Related to #4268.
Preview: https://pygmt-dev--4015.org.readthedocs.build/en/4015/api/generated/pygmt.Figure.scalebar.html#pygmt.Figure.scalebar
TODO in separate PRs
scalebarmethodmap_scaleinFigure.coast/Figure.basemap