-
Notifications
You must be signed in to change notification settings - Fork 235
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
8acb461 to
14283bd
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)DetailsAdded images
Modified images
Report last updated at commit 0112a75 |
0fdd8a3 to
c86e8d5
Compare
c86e8d5 to
c15533c
Compare
c15533c to
78cd352
Compare
|
Ping @GenericMappingTools/pygmt-maintainers for final reviews. I plan to merge it after 48 hours. |
| Length of the scale bar in km. Append a suffix to specify different units. Valid | ||
| units are: **e**: meters; **f**: feet; **k**: kilometers; **M**: statute mile; | ||
| **n**: nautical miles; **u**: US Survey foot. |
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.
Currently we have different versions how we document the valid units:
$ grep "mile" */*
helpers/decorators.py: **M**\ (iles), or **n**\ (autical miles) [Default is (m)\ **e**\ (ters)].
helpers/decorators.py: is assumed to be given in meter, foot, km, mile, nautical mile or
src/grdproject.py: **k** (kilometers), **M** (statute miles), **n** (nautical miles),
src/scalebar.py: units are: **e**: meters; **f**: feet; **k**: kilometers; **M**: statute mile;
src/scalebar.py: **n**: nautical miles; **u**: US Survey foot.
src/sphdistance.py: **M** (miles), **n** (nautical miles), or **u** (survey feet).
src/x2sys_init.py: - **m**: miles or mi/hr
src/x2sys_init.py: - **n**: nautical miles or knots
grep: tests/baseline: Is a directory
grep: tests/data: Is a directoryI feel it would be nice to make this consistent (but we can do this in a separat PR, after we agreeded on one version).
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
|
I've bumped this PR to v0.19.0 following #4289 (comment). |


This PR implements the
Figure.scalebarmethod, which wraps the-Loption inbasemap/coast. Related to #4268.The full syntax of -L is:
Here is a comparison of names used in PyGMT, GMT, and GMT.jl:
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