Skip to content

Commit

Permalink
Add lakes alias to Figure.coast() (#781)
Browse files Browse the repository at this point in the history
* Add lakes alias to coast in base_plotting.py

* Changing color to fill

* Update coast docstring to r-string and change line lengths

* Add test for lake alias to test_coast.py

* Run make format

* Update pygmt/base_plotting.py

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>

* Update pygmt/base_plotting.py

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>

* Fixing doc string length

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
  • Loading branch information
willschlitzer and seisman authored Jan 5, 2021
1 parent 7181cf1 commit a40a075
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pygmt/base_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def _preprocess(self, **kwargs): # pylint: disable=no-self-use
R="region",
J="projection",
A="area_thresh",
C="lakes",
B="frame",
D="resolution",
I="rivers",
Expand All @@ -77,7 +78,7 @@ def _preprocess(self, **kwargs): # pylint: disable=no-self-use
)
@kwargs_to_strings(R="sequence", p="sequence")
def coast(self, **kwargs):
"""
r"""
Plot continents, shorelines, rivers, and borders on maps
Plots grayshaded, colored, or textured land-masses [or water-masses] on
Expand Down Expand Up @@ -110,8 +111,13 @@ def coast(self, **kwargs):
hierarchical level that is lower than min_level or higher than
max_level will not be plotted.
{B}
C : str
Set the shade, color, or pattern for lakes and river-lakes.
lakes : str or list
*fill*\ [**+l**\ |**+r**\ ]
Set the shade, color, or pattern for lakes and river-lakes. The
default is the fill chosen for wet areas set by the ``water``
argument. Optionally, specify separate fills by appending
**+l** for lakes or **+r** for river-lakes, and passing multiple
strings in a list.
resolution : str
Selects the resolution of the data set to use ((f)ull, (h)igh,
(i)ntermediate, (l)ow, and (c)rude).
Expand Down
2 changes: 2 additions & 0 deletions pygmt/tests/test_coast.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def test_coast_aliases():
Y="a10c",
p="135/25",
t=13,
C="blue",
)
fig_test.coast(
region=[-30, 30, -40, 40], # R
Expand All @@ -74,6 +75,7 @@ def test_coast_aliases():
yshift="a10c", # Y
perspective=[135, 25], # p
transparency=13, # t
lakes="blue", # C
)
return fig_ref, fig_test

Expand Down

0 comments on commit a40a075

Please sign in to comment.