GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Add Figure.scalebar to plot a scale bar on maps by seisman · Pull Request #4015 · GenericMappingTools/pygmt Conversation
|
| modifier | PyGMT | GMT | GMT.jl |
|---|---|---|---|
| +w | length | length | length |
| +a | label_alignment | align | align |
| +c | scale_loc | loc | scale_at_lat |
| +l | label | label | label |
| +u | unit | units | units |
| +v | vertical | vertical | vertical |
Related to #4268
TODO in separate PRs
scalebar methodmap_scale in Figure.coast/Figure.basemap Figure.basemap/Figure.coast: Recommend to use the Figure.scalebar method to add a scalebar #4337
Sorry, something went wrong.
There was an error while loading. Please reload this page.
7a276b0 to
ec9b800
Compare
8acb461 to
14283bd
Compare
2a0ea6b to
17d8427
Compare
There was an error while loading. Please reload this page.
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 cc40c8f |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| 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.
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?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I feel label_position is more consisten, as we have nan_position for Figure.colorbar. And it is a bit shorter.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
0fdd8a3 to
c86e8d5
Compare
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <[email protected]>
There was an error while loading. Please reload this page.
| length: float | str, | ||
| height: float | str | None = None, | ||
| position: Position | Sequence[float | str] | AnchorCode | None = None, | ||
| scale_at: float | Sequence[float] | bool = False, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Hm. I do not really like this name.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
An alternative name may be scale_loc?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Not so easy finding a good name here. I was thinking about something in the direction of
reference_coords: a bit longreference_lat, scale_lat: partly also the longitude is givenMaybe location is enough, as "scale" is already contained in the method name "scalebar"?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I feel users may be confused by position and location
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Hm, this is something I was also a bit unsure about. Maybe there are ideas or preferences by @weiji14 and @michaelgrund?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think scale_loc is the best name we have so far:
position
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
OK. Done in 0561ba4.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Yvonne Fröhlich <[email protected]>
There was an error while loading. Please reload this page.
Co-authored-by: Yvonne Fröhlich <[email protected]>
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Yvonne Fröhlich <[email protected]>
There was an error while loading. Please reload this page.
Co-authored-by: Yvonne Fröhlich <[email protected]>
|
I'll merge this PR in 24 hours if no further comments. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
The gallery example (https://www.pygmt.org/dev/gallery/embellishments/scalebar.html) is updated in a separate PR, like for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yes, too keep this PR small |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| 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.
The reason will be displayed to describe this comment to others. Learn more.
I feel label_position is more consisten, as we have nan_position for Figure.colorbar. And it is a bit shorter.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Made two more comments.
Besides this, this PR looks good to me.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Yvonne Fröhlich <[email protected]>
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm merging this PR. We can still change the parameter names before releasing v0.19.0. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
OK, consistency with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@yvonnefroehlich Please let me know if you're interested in updating the gallery example https://www.pygmt.org/dev/gallery/embellishments/scalebar.html. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.