Skip to content

Commit

Permalink
Figure.rose: Deprecate parameter color to fill (remove in v0.12.0) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman authored Nov 10, 2022
1 parent 6964fe1 commit e4e4c43
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/gallery/histograms/rose.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# 0 to 1
norm=True,
# use red3 as color fill for the sectors
color="red3",
fill="red3",
# define the frame with ticks and gridlines every 0.2
# length unit in radial direction and every 30 degrees
# in azimuthal direction, set background color to
Expand Down
13 changes: 10 additions & 3 deletions pygmt/src/rose.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@
"""

from pygmt.clib import Session
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")
@use_alias(
A="sector",
B="frame",
C="cmap",
D="shift",
Em="vectors",
F="no_scale",
G="color",
G="fill",
I="inquire",
JX="diameter",
L="labels",
Expand Down Expand Up @@ -114,7 +121,7 @@ def rose(self, data=None, length=None, azimuth=None, **kwargs):
consideration, set them all to unity with ``scale="u"``
[Default is no scaling].
color : str
fill : str
Selects shade, color or pattern for filling the sectors [Default
is no fill].
Expand Down
10 changes: 5 additions & 5 deletions pygmt/tests/test_rose.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_rose_data_file(data_fractures_compilation):
region=[0, 1, 0, 360],
sector=15,
diameter="5.5c",
color="blue",
fill="blue",
frame=["x0.2g0.2", "y30g30", "+glightgray"],
pen="1p",
norm="",
Expand All @@ -61,7 +61,7 @@ def test_rose_2d_array_single():
region=[0, 1, 0, 360],
sector=10,
diameter="5.5c",
color="cyan",
fill="cyan",
frame=["x0.2g0.2", "y30g30", "+glightgray"],
pen="1p",
norm=True,
Expand All @@ -82,7 +82,7 @@ def test_rose_2d_array_multiple(data):
region=[0, 1, 0, 360],
sector=10,
diameter="5.5c",
color="blue",
fill="blue",
frame=["x0.2g0.2", "y30g30", "+gmoccasin"],
pen="1p",
norm=True,
Expand Down Expand Up @@ -128,7 +128,7 @@ def test_rose_plot_with_transparency(data_fractures_compilation):
region=[0, 1, 0, 360],
sector=15,
diameter="5.5c",
color="blue",
fill="blue",
frame=["x0.2g0.2", "y30g30", "+glightgray"],
pen="1p",
norm=True,
Expand Down Expand Up @@ -175,7 +175,7 @@ def test_rose_bools(data_fractures_compilation):
sector=10,
diameter="10c",
frame=["x0.2g0.2", "y30g30", "+glightgray"],
color="red3",
fill="red3",
pen="1p",
orientation=False,
norm=True,
Expand Down

0 comments on commit e4e4c43

Please sign in to comment.