From 44000253e20d48f1a9b208a86350c250b3a820f7 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 2 Jan 2021 10:45:42 +0000 Subject: [PATCH 1/8] Add lakes alias to coast in base_plotting.py --- pygmt/base_plotting.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pygmt/base_plotting.py b/pygmt/base_plotting.py index fdd63e73c58..4a316ff2fa7 100644 --- a/pygmt/base_plotting.py +++ b/pygmt/base_plotting.py @@ -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", @@ -110,8 +111,12 @@ 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 + *color*\ [**+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``. 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). From b747f9b665ba009ebc8de133c6a0504850ee5584 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 2 Jan 2021 11:09:27 +0000 Subject: [PATCH 2/8] Changing color to fill --- pygmt/base_plotting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/base_plotting.py b/pygmt/base_plotting.py index 4a316ff2fa7..6eb3264a462 100644 --- a/pygmt/base_plotting.py +++ b/pygmt/base_plotting.py @@ -112,7 +112,7 @@ def coast(self, **kwargs): max_level will not be plotted. {B} lakes : str or list - *color*\ [**+l**\ |**+r**\ ] + *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``. Optionally, specify separate fills by appending +l for lakes or +r for river-lakes, and passing From 5a36f2f57f27d5a3afaa587f9cb3cacaa76c8c08 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 2 Jan 2021 11:14:37 +0000 Subject: [PATCH 3/8] Update coast docstring to r-string and change line lengths --- pygmt/base_plotting.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pygmt/base_plotting.py b/pygmt/base_plotting.py index 6eb3264a462..6ca5e44bcac 100644 --- a/pygmt/base_plotting.py +++ b/pygmt/base_plotting.py @@ -78,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 @@ -113,10 +113,10 @@ def coast(self, **kwargs): {B} 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``. Optionally, specify - separate fills by appending +l for lakes or +r for river-lakes, and passing - multiple strings in a list. + Set the shade, color, or pattern for lakes and river-lakes. The + default is the fill chosen for wet areas set by the ``water``. + 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). From 20632cdd8eca6833eaf00296b477656a64627731 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 2 Jan 2021 11:39:22 +0000 Subject: [PATCH 4/8] Add test for lake alias to test_coast.py --- pygmt/tests/test_coast.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pygmt/tests/test_coast.py b/pygmt/tests/test_coast.py index 1098409db57..3d0c03efa7f 100644 --- a/pygmt/tests/test_coast.py +++ b/pygmt/tests/test_coast.py @@ -58,6 +58,7 @@ def test_coast_aliases(): Y="a10c", p="135/25", t=13, + C="blue" ) fig_test.coast( region=[-30, 30, -40, 40], # R @@ -76,6 +77,7 @@ def test_coast_aliases(): yshift="a10c", # Y perspective=[135, 25], # p transparency=13, # t + lakes="blue" # C ) return fig_ref, fig_test From 4219dee8215819fe2c152acb27d5a6527cfad364 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 2 Jan 2021 11:50:55 +0000 Subject: [PATCH 5/8] Run make format --- pygmt/tests/test_coast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/tests/test_coast.py b/pygmt/tests/test_coast.py index 3d0c03efa7f..9c0e730eac9 100644 --- a/pygmt/tests/test_coast.py +++ b/pygmt/tests/test_coast.py @@ -58,7 +58,7 @@ def test_coast_aliases(): Y="a10c", p="135/25", t=13, - C="blue" + C="blue", ) fig_test.coast( region=[-30, 30, -40, 40], # R @@ -77,7 +77,7 @@ def test_coast_aliases(): yshift="a10c", # Y perspective=[135, 25], # p transparency=13, # t - lakes="blue" # C + lakes="blue", # C ) return fig_ref, fig_test From 825484b89c46af869f1dbf6cfb6667997e4fbd84 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Mon, 4 Jan 2021 07:08:31 +0000 Subject: [PATCH 6/8] Update pygmt/base_plotting.py Co-authored-by: Dongdong Tian --- pygmt/base_plotting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/base_plotting.py b/pygmt/base_plotting.py index 6ca5e44bcac..8a7451833b0 100644 --- a/pygmt/base_plotting.py +++ b/pygmt/base_plotting.py @@ -114,7 +114,7 @@ def coast(self, **kwargs): 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``. + 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 From 0b03a13c25dc80d8c95507592f79d4001a908b42 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Mon, 4 Jan 2021 07:08:41 +0000 Subject: [PATCH 7/8] Update pygmt/base_plotting.py Co-authored-by: Dongdong Tian --- pygmt/base_plotting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/base_plotting.py b/pygmt/base_plotting.py index 8a7451833b0..263b4d3ea8a 100644 --- a/pygmt/base_plotting.py +++ b/pygmt/base_plotting.py @@ -115,8 +115,8 @@ def coast(self, **kwargs): *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. + 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). From bb3f1f810a54b0eb4794158e6f115ab1c6286c70 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Tue, 5 Jan 2021 07:07:50 +0000 Subject: [PATCH 8/8] Fixing doc string length --- pygmt/base_plotting.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pygmt/base_plotting.py b/pygmt/base_plotting.py index 263b4d3ea8a..1d476650379 100644 --- a/pygmt/base_plotting.py +++ b/pygmt/base_plotting.py @@ -114,9 +114,10 @@ def coast(self, **kwargs): 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. + 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).