From 7dd30102e04a3c28615f895485b8faa8ca2a1b81 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 20 Sep 2025 22:40:55 +0800 Subject: [PATCH 1/4] Figure.timestamp: Simplify the docstrings for parameter 'justify' --- pygmt/src/timestamp.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pygmt/src/timestamp.py b/pygmt/src/timestamp.py index 38105f6fffd..d519eeee5b1 100644 --- a/pygmt/src/timestamp.py +++ b/pygmt/src/timestamp.py @@ -41,12 +41,9 @@ def timestamp( label The text string shown after the GMT timestamp logo. justify - Justification of the timestamp box relative to the plot's bottom-left corner - (i.e., the plot origin). Give a two-character code that is a combination of a - horizontal (**L**\ (eft), **C**\ (enter), or **R**\ (ight)) and a vertical - (**T**\ (op), **M**\ (iddle), or **B**\ (ottom)) code. For example, - ``justify="TL"`` means choosing the **T**\ op **L**\ eft point of the timestamp - as the anchor point. + Specify a :doc:`2-character justification code ` + of the timestamp box relative to the plot's bottom-left corner (i.e., the plot + origin). E.g., e.g., the default is ``"BL"`` for Bottom Left. offset *offset* or (*offset_x*, *offset_y*). Offset the anchor point of the timestamp box by *offset_x* and *offset_y*. If a From fd710da7ea8b5658dd47ea86be257ea60beabcea Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 20 Sep 2025 23:13:33 +0800 Subject: [PATCH 2/4] Fix typos --- pygmt/src/timestamp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/timestamp.py b/pygmt/src/timestamp.py index d519eeee5b1..87bc86f2a80 100644 --- a/pygmt/src/timestamp.py +++ b/pygmt/src/timestamp.py @@ -43,7 +43,7 @@ def timestamp( justify Specify a :doc:`2-character justification code ` of the timestamp box relative to the plot's bottom-left corner (i.e., the plot - origin). E.g., e.g., the default is ``"BL"`` for Bottom Left. + origin). E.g., the default is ``"BL"`` for Bottom Left. offset *offset* or (*offset_x*, *offset_y*). Offset the anchor point of the timestamp box by *offset_x* and *offset_y*. If a From 1518ce7b3f44db3d9cb2981e97d1ed62a8e3b829 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 21 Sep 2025 03:13:51 +0800 Subject: [PATCH 3/4] Update pygmt/src/timestamp.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- pygmt/src/timestamp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/timestamp.py b/pygmt/src/timestamp.py index 87bc86f2a80..bd37a0f6fb7 100644 --- a/pygmt/src/timestamp.py +++ b/pygmt/src/timestamp.py @@ -42,8 +42,8 @@ def timestamp( The text string shown after the GMT timestamp logo. justify Specify a :doc:`2-character justification code ` - of the timestamp box relative to the plot's bottom-left corner (i.e., the plot - origin). E.g., the default is ``"BL"`` for Bottom Left. + for the timestamp box relative to the current plot origin. The default is the + Bottom Left (``"BL"``) corner. offset *offset* or (*offset_x*, *offset_y*). Offset the anchor point of the timestamp box by *offset_x* and *offset_y*. If a From 88d8223f777ad859a561475d3cd4aa636f3314c4 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 21 Sep 2025 08:44:45 +0800 Subject: [PATCH 4/4] Improve docstrings --- pygmt/src/timestamp.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pygmt/src/timestamp.py b/pygmt/src/timestamp.py index bd37a0f6fb7..bee28a7c974 100644 --- a/pygmt/src/timestamp.py +++ b/pygmt/src/timestamp.py @@ -26,11 +26,12 @@ def timestamp( r""" Plot the GMT timestamp logo. - Add the GMT timestamp logo with an optional label at the bottom-left corner of a - plot with an offset of ``("-54p", "-54p")``. The timestamp will be in the locale set - by the environment variable :term:`TZ` (generally local time but can be changed via - ``os.environ["TZ"]``) and its format is controlled by the ``timefmt`` parameter. It - can also be replaced with any custom text string using the ``text`` parameter. + Add the GMT timestamp logo with an optional label at the bottom-left corner relative + to the current plot origin, with an offset of ``("-54p", "-54p")``. The timestamp + will be in the locale set by the environment variable :term:`TZ` (generally local + time but can be changed via ``os.environ["TZ"]``) and its format is controlled by + the ``timefmt`` parameter. It can also be replaced with any custom text string using + the ``text`` parameter. Parameters ----------