Skip to content

Commit

Permalink
Update region and projection standard docstrings (GenericMappingTools…
Browse files Browse the repository at this point in the history
…#1510)

Modify the COMMON_OPTIONS text for region and projection to
remove the "Required if this is the first plot command" text, but
adding it solely to `basemap`, `coast` and `text` where it is actually
required.

Co-authored-by: Meghan Jones <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
  • Loading branch information
3 people authored and Josh Sixsmith committed Dec 21, 2022
1 parent 560faca commit 6018c7f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pygmt/helpers/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
COMMON_OPTIONS = {
"R": r"""
region : str or list
*Required if this is the first plot command*.
*xmin/xmax/ymin/ymax*\ [**+r**][**+u**\ *unit*].
Specify the :doc:`region </tutorials/regions>` of interest.""",
"J": r"""
projection : str
*Required if this is the first plot command*.
*projcode*\[*projparams*/]\ *width*.
Select map :doc:`projection </projections/index>`.""",
"A": r"""
Expand Down Expand Up @@ -448,11 +446,9 @@ def fmt_docstring(module_func):
data variables, or a :class:`geopandas.GeoDataFrame` containing the
tabular data.
region : str or list
*Required if this is the first plot command*.
*xmin/xmax/ymin/ymax*\ [**+r**][**+u**\ *unit*].
Specify the :doc:`region </tutorials/regions>` of interest.
projection : str
*Required if this is the first plot command*.
*projcode*\[*projparams*/]\ *width*.
Select map :doc:`projection </projections/index>`.
<BLANKLINE>
Expand Down
1 change: 1 addition & 0 deletions pygmt/src/basemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def basemap(self, **kwargs):
zscale/zsize : float or str
Set z-axis scaling or z-axis size.
{R}
*Required if this is the first plot command.*
{B}
map_scale : str
[**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
Expand Down
1 change: 1 addition & 0 deletions pygmt/src/coast.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def coast(self, **kwargs):
----------
{J}
{R}
*Required if this is the first plot command.*
{A}
{B}
lakes : str or list
Expand Down
1 change: 1 addition & 0 deletions pygmt/src/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def text_(
then the input to ``textfiles`` must have this as a column.
{J}
{R}
*Required if this is the first plot command.*
clearance : str
[*dx/dy*][**+to**\|\ **O**\|\ **c**\|\ **C**].
Adjust the clearance between the text and the surrounding box
Expand Down

0 comments on commit 6018c7f

Please sign in to comment.