Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure.rose: Deprecate parameter color to fill (remove in v0.12.0) #2181

Merged
merged 1 commit into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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