Skip to content

Commit dd2b374

Browse files
willschlitzerMeghan Jonesseisman
authored
Update region and projection standard docstrings (#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]>
1 parent 8c07cac commit dd2b374

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

pygmt/helpers/decorators.py

-4
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717
COMMON_OPTIONS = {
1818
"R": r"""
1919
region : str or list
20-
*Required if this is the first plot command*.
2120
*xmin/xmax/ymin/ymax*\ [**+r**][**+u**\ *unit*].
2221
Specify the :doc:`region </tutorials/regions>` of interest.""",
2322
"J": r"""
2423
projection : str
25-
*Required if this is the first plot command*.
2624
*projcode*\[*projparams*/]\ *width*.
2725
Select map :doc:`projection </projections/index>`.""",
2826
"A": r"""
@@ -448,11 +446,9 @@ def fmt_docstring(module_func):
448446
data variables, or a :class:`geopandas.GeoDataFrame` containing the
449447
tabular data.
450448
region : str or list
451-
*Required if this is the first plot command*.
452449
*xmin/xmax/ymin/ymax*\ [**+r**][**+u**\ *unit*].
453450
Specify the :doc:`region </tutorials/regions>` of interest.
454451
projection : str
455-
*Required if this is the first plot command*.
456452
*projcode*\[*projparams*/]\ *width*.
457453
Select map :doc:`projection </projections/index>`.
458454
<BLANKLINE>

pygmt/src/basemap.py

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def basemap(self, **kwargs):
5555
zscale/zsize : float or str
5656
Set z-axis scaling or z-axis size.
5757
{R}
58+
*Required if this is the first plot command.*
5859
{B}
5960
map_scale : str
6061
[**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\

pygmt/src/coast.py

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def coast(self, **kwargs):
6565
----------
6666
{J}
6767
{R}
68+
*Required if this is the first plot command.*
6869
{A}
6970
{B}
7071
lakes : str or list

pygmt/src/text.py

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def text_(
117117
then the input to ``textfiles`` must have this as a column.
118118
{J}
119119
{R}
120+
*Required if this is the first plot command.*
120121
clearance : str
121122
[*dx/dy*][**+to**\|\ **O**\|\ **c**\|\ **C**].
122123
Adjust the clearance between the text and the surrounding box

0 commit comments

Comments
 (0)