Skip to content

Commit e4e4c43

Browse files
authored
Figure.rose: Deprecate parameter color to fill (remove in v0.12.0) (#2181)
1 parent 6964fe1 commit e4e4c43

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

examples/gallery/histograms/rose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# 0 to 1
3333
norm=True,
3434
# use red3 as color fill for the sectors
35-
color="red3",
35+
fill="red3",
3636
# define the frame with ticks and gridlines every 0.2
3737
# length unit in radial direction and every 30 degrees
3838
# in azimuthal direction, set background color to

pygmt/src/rose.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,25 @@
33
"""
44

55
from pygmt.clib import Session
6-
from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias
6+
from pygmt.helpers import (
7+
build_arg_string,
8+
deprecate_parameter,
9+
fmt_docstring,
10+
kwargs_to_strings,
11+
use_alias,
12+
)
713

814

915
@fmt_docstring
16+
@deprecate_parameter("color", "fill", "v0.8.0", "v0.12.0")
1017
@use_alias(
1118
A="sector",
1219
B="frame",
1320
C="cmap",
1421
D="shift",
1522
Em="vectors",
1623
F="no_scale",
17-
G="color",
24+
G="fill",
1825
I="inquire",
1926
JX="diameter",
2027
L="labels",
@@ -114,7 +121,7 @@ def rose(self, data=None, length=None, azimuth=None, **kwargs):
114121
consideration, set them all to unity with ``scale="u"``
115122
[Default is no scaling].
116123
117-
color : str
124+
fill : str
118125
Selects shade, color or pattern for filling the sectors [Default
119126
is no fill].
120127

pygmt/tests/test_rose.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_rose_data_file(data_fractures_compilation):
3939
region=[0, 1, 0, 360],
4040
sector=15,
4141
diameter="5.5c",
42-
color="blue",
42+
fill="blue",
4343
frame=["x0.2g0.2", "y30g30", "+glightgray"],
4444
pen="1p",
4545
norm="",
@@ -61,7 +61,7 @@ def test_rose_2d_array_single():
6161
region=[0, 1, 0, 360],
6262
sector=10,
6363
diameter="5.5c",
64-
color="cyan",
64+
fill="cyan",
6565
frame=["x0.2g0.2", "y30g30", "+glightgray"],
6666
pen="1p",
6767
norm=True,
@@ -82,7 +82,7 @@ def test_rose_2d_array_multiple(data):
8282
region=[0, 1, 0, 360],
8383
sector=10,
8484
diameter="5.5c",
85-
color="blue",
85+
fill="blue",
8686
frame=["x0.2g0.2", "y30g30", "+gmoccasin"],
8787
pen="1p",
8888
norm=True,
@@ -128,7 +128,7 @@ def test_rose_plot_with_transparency(data_fractures_compilation):
128128
region=[0, 1, 0, 360],
129129
sector=15,
130130
diameter="5.5c",
131-
color="blue",
131+
fill="blue",
132132
frame=["x0.2g0.2", "y30g30", "+glightgray"],
133133
pen="1p",
134134
norm=True,
@@ -175,7 +175,7 @@ def test_rose_bools(data_fractures_compilation):
175175
sector=10,
176176
diameter="10c",
177177
frame=["x0.2g0.2", "y30g30", "+glightgray"],
178-
color="red3",
178+
fill="red3",
179179
pen="1p",
180180
orientation=False,
181181
norm=True,

0 commit comments

Comments
 (0)