diff --git a/pygmt/src/velo.py b/pygmt/src/velo.py index 4fdd9ac9f8a..234bfb9b1ab 100644 --- a/pygmt/src/velo.py +++ b/pygmt/src/velo.py @@ -5,17 +5,25 @@ import pandas as pd from pygmt.clib import Session from pygmt.exceptions import GMTInvalidInput -from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias +from pygmt.helpers import ( + build_arg_string, + deprecate_parameter, + fmt_docstring, + kwargs_to_strings, + use_alias, +) @fmt_docstring +@deprecate_parameter("color", "fill", "v0.8.0", "v0.12.0") +@deprecate_parameter("uncertaintycolor", "uncertaintyfill", "v0.8.0", "v0.12.0") @use_alias( A="vector", B="frame", C="cmap", D="rescale", - E="uncertaintycolor", - G="color", + E="uncertaintyfill", + G="fill", H="scale", I="shading", J="projection", @@ -78,8 +86,8 @@ def velo(self, data=None, **kwargs): [Default is 9p,Helvetica,black]; give **+f**\ 0 to deactivate labeling. The arrow will be drawn with the pen attributes specified by the ``pen`` parameter and the arrow-head can be colored via - ``color``. The ellipse will be filled with the color or shade - specified by the ``uncertaintycolor`` parameter [Default is + ``fill``. The ellipse will be filled with the color or shade + specified by the ``uncertaintyfill`` parameter [Default is transparent], and its outline will be drawn if ``line`` is selected using the pen selected (by ``pen`` if not given by ``line``). Parameters are expected to be in the following columns: @@ -111,8 +119,8 @@ def velo(self, data=None, **kwargs): [Default is 9p,Helvetica,black]; give **+f**\ 0 to deactivate labeling. The arrow will be drawn with the pen attributes specified by the ``pen`` parameter and the arrow-head can be colored via - ``color``. The ellipse will be filled with the color or shade - specified by the ``uncertaintycolor`` parameter [Default is + ``fill``. The ellipse will be filled with the color or shade + specified by the ``uncertaintyfill`` parameter [Default is transparent], and its outline will be drawn if ``line`` is selected using the pen selected (by ``pen`` if not given by ``line``). Parameters are expected to be in the following columns: @@ -130,8 +138,8 @@ def velo(self, data=None, **kwargs): *wedgescale* is not given then we read it from the data file as an extra column. Rotation values are multiplied by *wedgemag* before plotting. For example, setting *wedgemag* to 1.e7 works well for - rotations of the order of 100 nanoradians/yr. Use ``color`` to set - the fill color or shade for the wedge, and ``uncertaintycolor`` to + rotations of the order of 100 nanoradians/yr. Use ``fill`` to set + the fill color or shade for the wedge, and ``uncertaintyfill`` to set the color or shade for the uncertainty. Parameters are expected to be in the following columns: @@ -165,15 +173,15 @@ def velo(self, data=None, **kwargs): can be used to rescale the uncertainties of velocities (``spec="e"`` and ``spec="r"``) and rotations (``spec="w"``). Can be combined with the ``confidence`` variable. - uncertaintycolor : str + uncertaintyfill : str Sets the color or shade used for filling uncertainty wedges (``spec="w"``) or velocity error ellipses (``spec="e"`` or - ``spec="r"``). If ``uncertaintycolor`` is not specified, the + ``spec="r"``). If ``uncertaintyfill`` is not specified, the uncertainty regions will be transparent. **Note**: Using ``cmap`` and ``zvalue="+e"`` will update the uncertainty fill color based on the selected measure in ``zvalue`` [magnitude error]. More details at :gmt-docs:`cookbook/features.html#gfill-attrib`. - color : str + fill : str Select color or pattern for filling of symbols [Default is no fill]. **Note**: Using ``cmap`` (and optionally ``zvalue``) will update the symbol fill color based on the selected measure in ``zvalue`` diff --git a/pygmt/tests/test_velo.py b/pygmt/tests/test_velo.py index acb581cf53a..afaac1d8465 100644 --- a/pygmt/tests/test_velo.py +++ b/pygmt/tests/test_velo.py @@ -77,7 +77,7 @@ def test_velo_pandas_dataframe(dataframe): region=[-10, 8, -10, 6], projection="x0.8c", pen="0.6p,red", - uncertaintycolor="lightblue1", + uncertaintyfill="lightblue1", line=True, ) return fig