Skip to content

Commit 6df6214

Browse files
authored
Improve the documentation of Figure.shift_origin() (#536)
- Fix a broken link - Add a note that the function can't be used as the fisrt plotting command.
1 parent a06b4cf commit 6df6214

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pygmt/figure.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def shift_origin(self, xshift=None, yshift=None):
298298
Shift plot origin in x and/or y directions.
299299
300300
This method shifts plot origin relative to the current origin by
301-
(*xshift*,*yshift*) and optionally append the length unit (**c**,
301+
(*xshift*, *yshift*) and optionally append the length unit (**c**,
302302
**i**, or **p**).
303303
304304
Prepend **a** to shift the origin back to the original position after
@@ -308,14 +308,22 @@ def shift_origin(self, xshift=None, yshift=None):
308308
move the origin relative to its current location.
309309
310310
Detailed usage at
311-
:gmt-docs:`GMT_Docs.html#plot-positioning-and-layout-the-x-y-options`
311+
:gmt-docs:`cookbook/options.html#plot-positioning-and-layout-the-x-y-options`
312312
313313
Parameters
314314
----------
315315
xshift : str
316316
Shift plot origin in x direction.
317317
yshift : str
318318
Shift plot origin in y direction.
319+
320+
Notes
321+
-----
322+
For GMT 6.1.0, this function can't be used as the first plotting
323+
function of :meth:`pygmt.Figure`, since it relies the *region* and
324+
*projection* settings from previous commands.
325+
326+
.. TODO: Remove the notes when PyGMT bumps to GMT>=6.1.1.
319327
"""
320328
self._preprocess()
321329
args = ["-T"]

0 commit comments

Comments
 (0)