-
Notifications
You must be signed in to change notification settings - Fork 234
Add a gallery example for the Figure.timestamp method #2391
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
Conversation
|
Adding a static time format string via e.g. |
|
/format |
It's because the Line 100 in 8d165c1
|
| # Define static format string. | ||
| pygmt.config(FORMAT_TIME_STAMP="2023-03-01T20:45:15") |
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.
We don't need to have a static UNIX timestamp string here, because the gallery examples are not tested in the CI.
Hm. Probably you may want to use the
From the upstream GMT documentation I understand that
|
|
As already suggested by @weiji14 in #2208, in my opinion the justification shortcuts are not correct: I would say the labels must be switched across the diagonal axis. However, I think that must be fixed upstream. Maybe @PaulWessel can tell us if this is the correct behavior or it should be fixed. |
|
/format |
Hm. I feel they are correct. Maybe the confusion is coming from the difference between Edit 2023/03/11: Updated picture regarding more precise usage of "figure" and "map"/"plot". |
Ok now I got it, thanks @yvonnefroehlich. |
| can be added via the ``label`` parameter. The timestamp | ||
| will always be shown in the bottom-left corner of the | ||
| figure. |
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.
I would be a bit more detailed here. Feel free to improve my formulation.
| can be added via the ``label`` parameter. The timestamp | |
| will always be shown in the bottom-left corner of the | |
| figure. | |
| can be added via the ``label`` parameter. The timestamp | |
| will always be shown relative to the bottom-left corner | |
| of the figure. By default, the ``offset`` and | |
| ``justification`` parameters are set to | |
| ``("-54p", "-54p")`` (x, y directions) and ``"BL"`` | |
| (bottom-left), respectively. |
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.
Hm. Based on @michaelgrund's comment #2395 (comment), I am wondering whether this formulation is strictly speaking also not precise / correct and "figure" should be "map" (or "plot")?
Edit 2023/03/17: Changed in PR #2434.
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.
Perhaps open a separate issue so that we can have more discussions.
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.
Please see issue #2437.
Co-authored-by: Yvonne Fröhlich <[email protected]>
Co-authored-by: Yvonne Fröhlich <[email protected]>
|
/format |
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.
This PR looks good to me except the minor fix above.
Co-authored-by: Dongdong Tian <[email protected]>
yvonnefroehlich
left a comment
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.
Looks good to me! Thanks @michaelgrund for considering all the suggestions 🙂.


Description of proposed changes
Addresses #2390.
Preview: https://pygmt-dev--2391.org.readthedocs.build/en/2391/gallery/embellishments/timestamp.html
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version