From d2f726dde091d8da302fee1a1d1a65b486da3d1d Mon Sep 17 00:00:00 2001 From: core-man Date: Fri, 26 Mar 2021 22:29:15 +0800 Subject: [PATCH 01/19] Wrap wiggle --- pygmt/figure.py | 1 + pygmt/src/__init__.py | 1 + pygmt/src/wiggle.py | 92 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 pygmt/src/wiggle.py diff --git a/pygmt/figure.py b/pygmt/figure.py index a8d89b1e727..d1ae364f182 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -394,4 +394,5 @@ def _repr_html_(self): solar, subplot, text, + wiggle, ) diff --git a/pygmt/src/__init__.py b/pygmt/src/__init__.py index 7fae8fd8a2d..63eac8fd49d 100644 --- a/pygmt/src/__init__.py +++ b/pygmt/src/__init__.py @@ -30,5 +30,6 @@ from pygmt.src.surface import surface from pygmt.src.text import text_ as text # "text" is an argument within "text_" from pygmt.src.which import which +from pygmt.src.wiggle import wiggle from pygmt.src.x2sys_cross import x2sys_cross from pygmt.src.x2sys_init import x2sys_init diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py new file mode 100644 index 00000000000..9165736921a --- /dev/null +++ b/pygmt/src/wiggle.py @@ -0,0 +1,92 @@ +""" +wiggle - Plot z=f(x,y) anomalies along tracks. +""" +from pygmt.clib import Session +from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias + + +@fmt_docstring +@use_alias( + J="projection", + R="region", + Z="scale", + B="frame", + D="position", + G="color", + T="track", + U="timestamp", + V="verbose", + W="pen", + X="xshift", + Y="yshift", + c="panel", + i="columns", + p="perspective", + t="transparency", +) +@kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence") +def wiggle(self, x=None, y=None, z=None, data=None, **kwargs): + r""" + Plot z=f(x,y) anomalies along tracks. + + Takes a matrix, (x,y,z) triplets, or a file name as input and plots z as a + function of distance along track. + + Must provide either ``data`` or ``x``/``y``/``z``. + + Full parameter list at :gmt-docs:`wiggle.html` + + {aliases} + + Parameters + ---------- + x/y/z : float or 1d arrays + The x and y coordinates, or arrays of x and y coordinates of the + z data point or an array of z data points. + data : str or 2d array + Either a data file name or a 2d numpy array with the tabular data. + Use parameter ``columns`` to choose which columns are x, y, z, + respectively. + {J} + {R} + scale : str or float + Gives anomaly scale in data-units/distance-unit. Append **c**, **i**, + or **p** to indicate the distance unit (cm, inch, or point); if no unit + is given we use the default unit that is controlled by + :gmt-docs:`PROJ_LENGTH_UNIT `. + {B} + position : str + [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ + **+w**\ *length*\ [**+j**\ *justify*]\ [**+al**\ |\ **r**]\ + [**+o**\ *dx*\ [/*dy*]][**+l**\ [*label*]] + Defines the reference point on the map for the vertical scale bar. + {G} + track : str + Draw track [Default is no track]. Append pen attributes to use + [Defaults: width = 0.25p, color = black, style = solid]. + {U} + {V} + {W} + {XY} + {c} + columns : str or 1d array + Choose which columns are x, y, and z, respectively if input is provided + via *data*. E.g. ``columns = [0, 1, 2]`` or ``columns = "0,1,2"`` if + the *x* values are stored in the first column, *y* values in the second + one and *z* values in the third one. Note: zero-based indexing is used. + {p} + {t} + *transparency* can also be a 1d array to set varying transparency + for symbols. + """ + kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access + + with Session() as lib: + # Choose how data will be passed in to the module + file_context = lib.virtualfile_from_data( + check_kind="vector", data=data, x=x, y=y, z=z + ) + + with file_context as fname: + arg_str = " ".join([fname, build_arg_string(kwargs)]) + lib.call_module("wiggle", arg_str) From bd459ef2fe6d2181e5a432986e5ad09635e6590c Mon Sep 17 00:00:00 2001 From: core-man Date: Mon, 29 Mar 2021 16:54:23 +0800 Subject: [PATCH 02/19] Add a draft example --- examples/gallery/seismology/wiggle.py | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 examples/gallery/seismology/wiggle.py diff --git a/examples/gallery/seismology/wiggle.py b/examples/gallery/seismology/wiggle.py new file mode 100644 index 00000000000..674f3c22c5d --- /dev/null +++ b/examples/gallery/seismology/wiggle.py @@ -0,0 +1,32 @@ +""" +Wiggle along tracks +-------------------- + +The :meth:`pygmt.Figure.wiggle` method can plot z = f(x,y) anomalies along +tracks. ``x``, ``y``, ``z`` can be specified as 1d arrays or within a specified +file. +""" + +import numpy as np +import pygmt + +# Create (x, y, z) which is equal to the gmt math above +x = np.arange(-8, 7, 0.1) +y = np.zeros(x.size) +z = 50 * np.exp(-((x / 3) ** 2)) * np.cos(2 * np.pi * x) + +fig = pygmt.Figure() +fig.basemap( + region=[-10, 10, -1, 1], projection="X15c", frame=["WSne", "xa2f1", "ya0.5"] +) +fig.wiggle( + x=x, + y=y, + z=z, + scale="10c", + position="jRM+w100+lnT", + track="0.5p", + color="red+p+n", + pen="0.5p", +) +fig.show() From 1899f40eac8f80519468cd57d6879bd3a19bf8ce Mon Sep 17 00:00:00 2001 From: Yao Jiayuan Date: Tue, 6 Apr 2021 19:49:00 +0800 Subject: [PATCH 03/19] Apply suggestions from code review Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> --- pygmt/src/wiggle.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index 9165736921a..bf60b014e44 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -7,18 +7,18 @@ @fmt_docstring @use_alias( - J="projection", - R="region", - Z="scale", B="frame", D="position", G="color", + J="projection", + R="region", T="track", U="timestamp", V="verbose", W="pen", X="xshift", Y="yshift", + Z="scale", c="panel", i="columns", p="perspective", From 33deee7638e9971f2506e09519f3877a8c952e3b Mon Sep 17 00:00:00 2001 From: Yao Jiayuan Date: Tue, 6 Apr 2021 19:55:24 +0800 Subject: [PATCH 04/19] Add wiggle in doc/api/index --- doc/api/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/index.rst b/doc/api/index.rst index 0f673b90d5b..e1fd5217234 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -41,6 +41,7 @@ Plotting data and laying out the map: Figure.solar Figure.subplot Figure.text + Figure.wiggle Color palette table generation: From 5f9f7a11c2ce252e5bded5fe0b69cf96fc180ac8 Mon Sep 17 00:00:00 2001 From: core-man Date: Wed, 14 Apr 2021 14:13:29 +0800 Subject: [PATCH 05/19] Add test_wiggle --- pygmt/tests/test_wiggle.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pygmt/tests/test_wiggle.py diff --git a/pygmt/tests/test_wiggle.py b/pygmt/tests/test_wiggle.py new file mode 100644 index 00000000000..65634add546 --- /dev/null +++ b/pygmt/tests/test_wiggle.py @@ -0,0 +1,32 @@ +# pylint: disable=redefined-outer-name +""" +Tests wiggle. +""" +import numpy as np +import pytest +from pygmt import Figure + + +@pytest.mark.mpl_image_compare +def test_plot_wiggle(): + """ + Plot the z=f(x,y) anomalies along tracks. + """ + x = np.arange(-2, 2, 0.02) + y = np.zeros(x.size) + z = np.cos(2 * np.pi * x) + + fig = Figure() + fig.wiggle( + region=[-4, 4, -1, 1], + projection="X8c", + x=x, + y=y, + z=z, + scale="0.5c", + color=["red+p", "gray+n"], + pen="1.0p", + track="0.5p", + position="jRM+w2+lnT", + ) + return fig From 67226611daa4fd71213a1a6eb958f79140ca24d4 Mon Sep 17 00:00:00 2001 From: core-man Date: Wed, 14 Apr 2021 14:18:56 +0800 Subject: [PATCH 06/19] Fix test name --- pygmt/tests/test_wiggle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/tests/test_wiggle.py b/pygmt/tests/test_wiggle.py index 65634add546..d90f2173285 100644 --- a/pygmt/tests/test_wiggle.py +++ b/pygmt/tests/test_wiggle.py @@ -8,7 +8,7 @@ @pytest.mark.mpl_image_compare -def test_plot_wiggle(): +def test_wiggle(): """ Plot the z=f(x,y) anomalies along tracks. """ From 54adcff5dbd43a0d76fe3c863cbd0d819049ccb9 Mon Sep 17 00:00:00 2001 From: core-man Date: Wed, 14 Apr 2021 14:20:25 +0800 Subject: [PATCH 07/19] Add test_wiggle.png into DVC --- pygmt/tests/baseline/test_wiggle.png.dvc | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 pygmt/tests/baseline/test_wiggle.png.dvc diff --git a/pygmt/tests/baseline/test_wiggle.png.dvc b/pygmt/tests/baseline/test_wiggle.png.dvc new file mode 100644 index 00000000000..5f3819fb339 --- /dev/null +++ b/pygmt/tests/baseline/test_wiggle.png.dvc @@ -0,0 +1,4 @@ +outs: +- md5: 5ac12f7e91127dae1fa70cec77b84c0b + size: 9144 + path: test_wiggle.png From 2316537745954a161c771a386196a193c9d30263 Mon Sep 17 00:00:00 2001 From: core-man Date: Wed, 14 Apr 2021 14:51:22 +0800 Subject: [PATCH 08/19] Refine the wiggle gallery example --- examples/gallery/seismology/wiggle.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/gallery/seismology/wiggle.py b/examples/gallery/seismology/wiggle.py index 674f3c22c5d..282d1ef6146 100644 --- a/examples/gallery/seismology/wiggle.py +++ b/examples/gallery/seismology/wiggle.py @@ -10,23 +10,23 @@ import numpy as np import pygmt -# Create (x, y, z) which is equal to the gmt math above -x = np.arange(-8, 7, 0.1) +# Create (x, y, z) triplets +x = np.arange(-7, 7, 0.1) y = np.zeros(x.size) z = 50 * np.exp(-((x / 3) ** 2)) * np.cos(2 * np.pi * x) fig = pygmt.Figure() fig.basemap( - region=[-10, 10, -1, 1], projection="X15c", frame=["WSne", "xa2f1", "ya0.5"] + region=[-8, 12, -1, 1], projection="X10c", frame=["Snlr", "xa2f1"] ) fig.wiggle( x=x, y=y, z=z, - scale="10c", - position="jRM+w100+lnT", + scale="20c", + color=["red+p", "gray+n"], + pen="1.0p", track="0.5p", - color="red+p+n", - pen="0.5p", + position="jRM+w100+lnT", ) fig.show() From cd44b148d84734d63e9e4aa6e5805bd0c232524c Mon Sep 17 00:00:00 2001 From: core-man Date: Wed, 14 Apr 2021 14:56:42 +0800 Subject: [PATCH 09/19] Remove the transparency parameter --- pygmt/src/wiggle.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index bf60b014e44..d2875d62ed6 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -22,7 +22,6 @@ c="panel", i="columns", p="perspective", - t="transparency", ) @kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence") def wiggle(self, x=None, y=None, z=None, data=None, **kwargs): @@ -75,9 +74,6 @@ def wiggle(self, x=None, y=None, z=None, data=None, **kwargs): the *x* values are stored in the first column, *y* values in the second one and *z* values in the third one. Note: zero-based indexing is used. {p} - {t} - *transparency* can also be a 1d array to set varying transparency - for symbols. """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access From 7deaa0eeff725c6070ee5c9c26cff31b4f2982e1 Mon Sep 17 00:00:00 2001 From: core-man Date: Wed, 14 Apr 2021 14:58:19 +0800 Subject: [PATCH 10/19] Format wiggle gallery example --- examples/gallery/seismology/wiggle.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/gallery/seismology/wiggle.py b/examples/gallery/seismology/wiggle.py index 282d1ef6146..cc8d5e4ca97 100644 --- a/examples/gallery/seismology/wiggle.py +++ b/examples/gallery/seismology/wiggle.py @@ -16,9 +16,7 @@ z = 50 * np.exp(-((x / 3) ** 2)) * np.cos(2 * np.pi * x) fig = pygmt.Figure() -fig.basemap( - region=[-8, 12, -1, 1], projection="X10c", frame=["Snlr", "xa2f1"] -) +fig.basemap(region=[-8, 12, -1, 1], projection="X10c", frame=["Snlr", "xa2f1"]) fig.wiggle( x=x, y=y, From 5e6c4bc939a2ae1eff30b48d0d8f7b31c0b08d20 Mon Sep 17 00:00:00 2001 From: core-man Date: Fri, 16 Apr 2021 14:55:05 +0800 Subject: [PATCH 11/19] Add more explanation for color --- pygmt/src/wiggle.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index d2875d62ed6..07b7a8e5570 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -59,7 +59,14 @@ def wiggle(self, x=None, y=None, z=None, data=None, **kwargs): **+w**\ *length*\ [**+j**\ *justify*]\ [**+al**\ |\ **r**]\ [**+o**\ *dx*\ [/*dy*]][**+l**\ [*label*]] Defines the reference point on the map for the vertical scale bar. - {G} + color: str + Set fill shade, color or pattern for positive and/or negative wiggles + [Default is no fill]. Optionally, append **+p** to fill positive areas + (this is the default behavior). Append **+n** to fill negative areas. + Append **+n+p** to fill both positive and negative areas with the same + fill. Note: You will need to repeat the color parameter to select + different fills for the positive and negative wiggles. + track : str Draw track [Default is no track]. Append pen attributes to use [Defaults: width = 0.25p, color = black, style = solid]. From ca35b51a2bce6817c0bb7c8b6ae30973c1fef158 Mon Sep 17 00:00:00 2001 From: core-man Date: Fri, 16 Apr 2021 15:21:53 +0800 Subject: [PATCH 12/19] Add more comments for the example --- examples/gallery/seismology/wiggle.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/gallery/seismology/wiggle.py b/examples/gallery/seismology/wiggle.py index cc8d5e4ca97..6a1ad567be7 100644 --- a/examples/gallery/seismology/wiggle.py +++ b/examples/gallery/seismology/wiggle.py @@ -4,7 +4,9 @@ The :meth:`pygmt.Figure.wiggle` method can plot z = f(x,y) anomalies along tracks. ``x``, ``y``, ``z`` can be specified as 1d arrays or within a specified -file. +file. The ``scale`` parameter can be used to set anomaly scale in +data-units/distance-unit. The positive and/or negative areas can be filled with +color by setting the ``color`` parameter. """ import numpy as np @@ -21,10 +23,16 @@ x=x, y=y, z=z, + # Set anomaly scale to "20c" scale="20c", + # Fill positive and negative areas red and gray, respectively color=["red+p", "gray+n"], + # Set the outline width to "1.0p" pen="1.0p", - track="0.5p", + # Draw a blue track of width 0.5 points + track="0.5p,blue", + # Plot a vertical scale bar at the right middle. The bar length is 100 in + # data (z) units. Set the z unit lable to "nT". position="jRM+w100+lnT", ) fig.show() From 3fff8e36f927e6b2686f394db5e9184faf0b191c Mon Sep 17 00:00:00 2001 From: core-man Date: Fri, 16 Apr 2021 15:24:58 +0800 Subject: [PATCH 13/19] Update the pen parameter --- pygmt/src/wiggle.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index 07b7a8e5570..84cddf66085 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -72,7 +72,8 @@ def wiggle(self, x=None, y=None, z=None, data=None, **kwargs): [Defaults: width = 0.25p, color = black, style = solid]. {U} {V} - {W} + pen : str + Specify outline pen attributes [Default is no outline]. {XY} {c} columns : str or 1d array From 3a1f78e41865cedc48b8fbd8e4a33e9e27e3be1a Mon Sep 17 00:00:00 2001 From: Yao Jiayuan Date: Fri, 16 Apr 2021 15:26:06 +0800 Subject: [PATCH 14/19] Apply suggestions from code review Co-authored-by: Dongdong Tian --- pygmt/src/wiggle.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index 84cddf66085..7c7e3c2925e 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -52,12 +52,12 @@ def wiggle(self, x=None, y=None, z=None, data=None, **kwargs): Gives anomaly scale in data-units/distance-unit. Append **c**, **i**, or **p** to indicate the distance unit (cm, inch, or point); if no unit is given we use the default unit that is controlled by - :gmt-docs:`PROJ_LENGTH_UNIT `. + :gmt-term:`PROJ_LENGTH_UNIT`. {B} position : str [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ **+w**\ *length*\ [**+j**\ *justify*]\ [**+al**\ |\ **r**]\ - [**+o**\ *dx*\ [/*dy*]][**+l**\ [*label*]] + [**+o**\ *dx*\ [/*dy*]][**+l**\ [*label*]]. Defines the reference point on the map for the vertical scale bar. color: str Set fill shade, color or pattern for positive and/or negative wiggles @@ -69,7 +69,7 @@ def wiggle(self, x=None, y=None, z=None, data=None, **kwargs): track : str Draw track [Default is no track]. Append pen attributes to use - [Defaults: width = 0.25p, color = black, style = solid]. + [Default is **0.25p,black,solid**\ ]. {U} {V} pen : str From 088039136c99a007e84bee0954c8fd5ebf10c86b Mon Sep 17 00:00:00 2001 From: core-man Date: Mon, 19 Apr 2021 19:17:48 +0800 Subject: [PATCH 15/19] Fix the explanation for x/y/z --- pygmt/src/wiggle.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index 84cddf66085..b9d3b9c0e16 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -39,9 +39,8 @@ def wiggle(self, x=None, y=None, z=None, data=None, **kwargs): Parameters ---------- - x/y/z : float or 1d arrays - The x and y coordinates, or arrays of x and y coordinates of the - z data point or an array of z data points. + x/y/z : 1d arrays + The arrays of x and y coordinates and z data points. data : str or 2d array Either a data file name or a 2d numpy array with the tabular data. Use parameter ``columns`` to choose which columns are x, y, z, From 4e573620abbc1098cc51a01f9b0d6889643d3906 Mon Sep 17 00:00:00 2001 From: Yao Jiayuan Date: Tue, 20 Apr 2021 00:04:28 +0800 Subject: [PATCH 16/19] Apply suggestions from code review Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com> --- examples/gallery/seismology/wiggle.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/gallery/seismology/wiggle.py b/examples/gallery/seismology/wiggle.py index 6a1ad567be7..75f115f6037 100644 --- a/examples/gallery/seismology/wiggle.py +++ b/examples/gallery/seismology/wiggle.py @@ -4,7 +4,7 @@ The :meth:`pygmt.Figure.wiggle` method can plot z = f(x,y) anomalies along tracks. ``x``, ``y``, ``z`` can be specified as 1d arrays or within a specified -file. The ``scale`` parameter can be used to set anomaly scale in +file. The ``scale`` parameter can be used to set the anomaly scale in data-units/distance-unit. The positive and/or negative areas can be filled with color by setting the ``color`` parameter. """ @@ -29,10 +29,10 @@ color=["red+p", "gray+n"], # Set the outline width to "1.0p" pen="1.0p", - # Draw a blue track of width 0.5 points + # Draw a blue track with a width of 0.5 points track="0.5p,blue", # Plot a vertical scale bar at the right middle. The bar length is 100 in - # data (z) units. Set the z unit lable to "nT". + # data (z) units. Set the z unit label to "nT". position="jRM+w100+lnT", ) fig.show() From 96a140ac53ee291948da0aaa9b3cbc2661d58218 Mon Sep 17 00:00:00 2001 From: Yao Jiayuan Date: Fri, 23 Apr 2021 10:47:53 +0800 Subject: [PATCH 17/19] Apply suggestions from code review Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> --- examples/gallery/seismology/wiggle.py | 6 +++--- pygmt/tests/test_wiggle.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/gallery/seismology/wiggle.py b/examples/gallery/seismology/wiggle.py index 75f115f6037..48ea5140cd0 100644 --- a/examples/gallery/seismology/wiggle.py +++ b/examples/gallery/seismology/wiggle.py @@ -1,11 +1,11 @@ """ Wiggle along tracks --------------------- +------------------- The :meth:`pygmt.Figure.wiggle` method can plot z = f(x,y) anomalies along tracks. ``x``, ``y``, ``z`` can be specified as 1d arrays or within a specified -file. The ``scale`` parameter can be used to set the anomaly scale in -data-units/distance-unit. The positive and/or negative areas can be filled with +file. The ``scale`` parameter can be used to set the scale of the anomaly in +data/distance units. The positive and/or negative areas can be filled with color by setting the ``color`` parameter. """ diff --git a/pygmt/tests/test_wiggle.py b/pygmt/tests/test_wiggle.py index d90f2173285..7bd92e15bb1 100644 --- a/pygmt/tests/test_wiggle.py +++ b/pygmt/tests/test_wiggle.py @@ -1,4 +1,3 @@ -# pylint: disable=redefined-outer-name """ Tests wiggle. """ From dedcd91e78cd3ebe349c0f91415d3c0b564469e1 Mon Sep 17 00:00:00 2001 From: Yao Jiayuan Date: Sat, 24 Apr 2021 00:44:56 +0800 Subject: [PATCH 18/19] Apply suggestions from code review Co-authored-by: Dongdong Tian --- pygmt/src/wiggle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index d5458360a41..2e3235e9b64 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -58,7 +58,7 @@ def wiggle(self, x=None, y=None, z=None, data=None, **kwargs): **+w**\ *length*\ [**+j**\ *justify*]\ [**+al**\ |\ **r**]\ [**+o**\ *dx*\ [/*dy*]][**+l**\ [*label*]]. Defines the reference point on the map for the vertical scale bar. - color: str + color : str Set fill shade, color or pattern for positive and/or negative wiggles [Default is no fill]. Optionally, append **+p** to fill positive areas (this is the default behavior). Append **+n** to fill negative areas. @@ -68,7 +68,7 @@ def wiggle(self, x=None, y=None, z=None, data=None, **kwargs): track : str Draw track [Default is no track]. Append pen attributes to use - [Default is **0.25p,black,solid**\ ]. + [Default is **0.25p,black,solid**]. {U} {V} pen : str From 3f32058ac836d11e2772057d4a62752c40eb3002 Mon Sep 17 00:00:00 2001 From: core-man Date: Sat, 24 Apr 2021 16:30:04 +0800 Subject: [PATCH 19/19] Move wiggel example to be within Line --- examples/gallery/{seismology => lines}/wiggle.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/gallery/{seismology => lines}/wiggle.py (100%) diff --git a/examples/gallery/seismology/wiggle.py b/examples/gallery/lines/wiggle.py similarity index 100% rename from examples/gallery/seismology/wiggle.py rename to examples/gallery/lines/wiggle.py