diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index 45dd6c21604..462218b3a49 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -1,10 +1,8 @@ """ wiggle - Plot z=f(x,y) anomalies along tracks. """ -import warnings from pygmt.clib import Session -from pygmt.exceptions import GMTInvalidInput from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias @@ -12,7 +10,6 @@ @use_alias( B="frame", D="position", - G="color", J="projection", R="region", T="track", @@ -102,17 +99,6 @@ def wiggle( """ kwargs = self._preprocess(**kwargs) - if (fillpositive or fillnegative) and kwargs.get("G") is not None: - raise GMTInvalidInput("Use either fillpositive/fillnegative or color.") - - if kwargs.get("G") is not None: - msg = ( - "The 'color' parameter has been deprecated since v0.8.0" - " and will be removed in v0.12.0. Use fillpositive/fillnegative" - " instead." - ) - warnings.warn(msg, category=FutureWarning, stacklevel=2) - if fillpositive or fillnegative: kwargs["G"] = [] if fillpositive: diff --git a/pygmt/tests/test_wiggle.py b/pygmt/tests/test_wiggle.py index 86e3687e2f3..0b76abfca08 100644 --- a/pygmt/tests/test_wiggle.py +++ b/pygmt/tests/test_wiggle.py @@ -4,7 +4,6 @@ import numpy as np import pytest from pygmt import Figure -from pygmt.exceptions import GMTInvalidInput @pytest.mark.mpl_image_compare @@ -61,57 +60,3 @@ def test_wiggle_data_incols(): position="jRM+w2+lnT", ) return fig - - -def test_wiggle_fill_multiple(): - """ - Check that wiggle fails when the parameters color and fillpositive/fillnegative are - used together. - """ - x = np.arange(-2, 2, 0.02) - y = np.zeros(x.size) - z = np.cos(2 * np.pi * x) - - fig = Figure() - with pytest.raises(GMTInvalidInput): - fig.wiggle( - x=x, - y=y, - z=z, - region=[-4, 4, -1, 1], - projection="X8c", - incols=[1, 0, 2], - scale="0.5c", - color="blue", - fillpositive="red", - fillnegative="gray", - pen="1.0p", - track="0.5p", - position="jRM+w2+lnT", - ) - - -def test_wiggle_use_color(): - """ - Check that wiggle raises a warning when the deprecated parameter color is used. - """ - x = np.arange(-2, 2, 0.02) - y = np.zeros(x.size) - z = np.cos(2 * np.pi * x) - - fig = Figure() - with pytest.warns(expected_warning=FutureWarning) as record: - fig.wiggle( - x=x, - y=y, - z=z, - region=[-4, 4, -1, 1], - projection="X8c", - incols=[1, 0, 2], - scale="0.5c", - color="blue", - pen="1.0p", - track="0.5p", - position="jRM+w2+lnT", - ) - assert len(record) == 1