Skip to content

Commit 7d30ac8

Browse files
Figure.velo: Deprecate parameters uncertaintyfill to uncertainty_fill (Will be removed in v0.20.0) (#4272)
1 parent 80e9e88 commit 7d30ac8

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

examples/gallery/seismology/velo_arrow_ellipse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
projection="x0.8c",
3434
frame=["WSne", "2g2f"],
3535
spec="e0.2/0.39+f18",
36-
uncertaintyfill="lightblue1",
36+
uncertainty_fill="lightblue1",
3737
pen="0.6p,red",
3838
line=True,
3939
vector="0.3c+p1p+e+gred",

examples/gallery/symbols/patterns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- :meth:`pygmt.Figure.solar`: Day-light terminators via ``fill``
1717
- :meth:`pygmt.Figure.ternary`: Symbols via ``fill``
1818
- :meth:`pygmt.Figure.velo`: Uncertainty wedges and velocity error ellipses via
19-
``uncertaintyfill``
19+
``uncertainty_fill``
2020
- :meth:`pygmt.Figure.wiggle`: Anomalies via ``positive_fill`` and ``negative_fill``
2121
2222
GMT provides 90 predefined 1-bit patterns, which are numbered from 1 to 90. In addition,

pygmt/src/velo.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@
1111
from pygmt.alias import Alias, AliasSystem
1212
from pygmt.clib import Session
1313
from pygmt.exceptions import GMTInvalidInput, GMTTypeError
14-
from pygmt.helpers import build_arg_list, fmt_docstring, use_alias
14+
from pygmt.helpers import build_arg_list, deprecate_parameter, fmt_docstring, use_alias
1515

1616

1717
@fmt_docstring
18+
@deprecate_parameter(
19+
"uncertaintyfill", "uncertainty_fill", "v0.18.0", remove_version="v0.20.0"
20+
)
1821
@use_alias(
1922
A="vector",
2023
C="cmap",
2124
D="rescale",
22-
E="uncertaintyfill",
25+
E="uncertainty_fill",
2326
G="fill",
2427
H="scale",
2528
I="shading",
@@ -97,7 +100,7 @@ def velo( # noqa : PLR0913
97100
labeling. The arrow will be drawn with the pen attributes specified
98101
by the ``pen`` parameter and the arrow-head can be colored via
99102
``fill``. The ellipse will be filled with the color or pattern
100-
specified by the ``uncertaintyfill`` parameter [Default is
103+
specified by the ``uncertainty_fill`` parameter [Default is
101104
transparent], and its outline will be drawn if ``line`` is selected
102105
using the pen selected (by ``pen`` if not given by ``line``).
103106
Parameters are expected to be in the following columns:
@@ -130,7 +133,7 @@ def velo( # noqa : PLR0913
130133
labeling. The arrow will be drawn with the pen attributes specified
131134
by the ``pen`` parameter and the arrow-head can be colored via
132135
``fill``. The ellipse will be filled with the color or pattern
133-
specified by the ``uncertaintyfill`` parameter [Default is
136+
specified by the ``uncertainty_fill`` parameter [Default is
134137
transparent], and its outline will be drawn if ``line`` is selected
135138
using the pen selected (by ``pen`` if not given by ``line``).
136139
Parameters are expected to be in the following columns:
@@ -149,7 +152,7 @@ def velo( # noqa : PLR0913
149152
extra column. Rotation values are multiplied by *wedgemag* before
150153
plotting. For example, setting *wedgemag* to 1.e7 works well for
151154
rotations of the order of 100 nanoradians/yr. Use ``fill`` to set
152-
the fill color or pattern for the wedge, and ``uncertaintyfill`` to
155+
the fill color or pattern for the wedge, and ``uncertainty_fill`` to
153156
set the color or pattern for the uncertainty. Parameters are
154157
expected to be in the following columns:
155158
@@ -183,10 +186,10 @@ def velo( # noqa : PLR0913
183186
Can be used to rescale the uncertainties of velocities (``spec="e"``
184187
and ``spec="r"``) and rotations (``spec="w"``). Can be combined with
185188
the ``confidence`` variable.
186-
uncertaintyfill : str
189+
uncertainty_fill : str
187190
Set color or pattern for filling uncertainty wedges (``spec="w"``)
188191
or velocity error ellipses (``spec="e"`` or ``spec="r"``).
189-
If ``uncertaintyfill`` is not specified, the uncertainty regions
192+
If ``uncertainty_fill`` is not specified, the uncertainty regions
190193
will be transparent. **Note**: Using ``cmap`` and ``zvalue="+e"``
191194
will update the uncertainty fill color based on the selected measure
192195
in ``zvalue`` [Default is magnitude error]. More details at

pygmt/tests/test_velo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_velo_pandas_dataframe(dataframe):
7979
region=[-10, 8, -10, 6],
8080
projection="x0.8c",
8181
pen="0.6p,red",
82-
uncertaintyfill="lightblue1",
82+
uncertainty_fill="lightblue1",
8383
line=True,
8484
)
8585
return fig

0 commit comments

Comments
 (0)