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.plot/plot3d: Remove parameter "sizes", use "size" instead #1809

Merged
merged 1 commit into from
Mar 13, 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: 0 additions & 2 deletions pygmt/src/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
build_arg_string,
check_data_input_order,
data_kind,
deprecate_parameter,
fmt_docstring,
is_nonstr_iter,
kwargs_to_strings,
Expand All @@ -17,7 +16,6 @@


@fmt_docstring
@deprecate_parameter("sizes", "size", "v0.4.0", remove_version="v0.6.0")
@check_data_input_order("v0.5.0", remove_version="v0.7.0")
@use_alias(
A="straight_line",
Expand Down
2 changes: 0 additions & 2 deletions pygmt/src/plot3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
build_arg_string,
check_data_input_order,
data_kind,
deprecate_parameter,
fmt_docstring,
is_nonstr_iter,
kwargs_to_strings,
Expand All @@ -17,7 +16,6 @@


@fmt_docstring
@deprecate_parameter("sizes", "size", "v0.4.0", remove_version="v0.6.0")
@check_data_input_order("v0.5.0", remove_version="v0.7.0")
@use_alias(
A="straight_line",
Expand Down
24 changes: 0 additions & 24 deletions pygmt/tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,30 +452,6 @@ def test_plot_datetime():
return fig


@pytest.mark.mpl_image_compare(filename="test_plot_sizes.png")
def test_plot_deprecate_sizes_to_size(data, region):
"""
Make sure that the old parameter "sizes" is supported and it reports a
warning.

Modified from the test_plot_sizes() test.
"""
fig = Figure()
with pytest.warns(expected_warning=FutureWarning) as record:
fig.plot(
x=data[:, 0],
y=data[:, 1],
sizes=0.5 * data[:, 2],
region=region,
projection="X10c",
style="cc",
color="blue",
frame="af",
)
assert len(record) == 1 # check that only one warning was raised
return fig


@pytest.mark.mpl_image_compare
def test_plot_ogrgmt_file_multipoint_default_style():
"""
Expand Down
27 changes: 0 additions & 27 deletions pygmt/tests/test_plot3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,33 +423,6 @@ def test_plot3d_scalar_xyz():
return fig


@pytest.mark.mpl_image_compare(filename="test_plot3d_sizes.png")
def test_plot3d_deprecate_sizes_to_size(data, region):
"""
Make sure that the old parameter "sizes" is supported and it reports an
warning.

Modified from the test_plot3d_sizes() test.
"""
fig = Figure()
with pytest.warns(expected_warning=FutureWarning) as record:
fig.plot3d(
x=data[:, 0],
y=data[:, 1],
z=data[:, 2],
zscale=5,
perspective=[225, 30],
sizes=0.5 * data[:, 2],
region=region,
projection="X10c",
style="ui",
color="blue",
frame=["af", "zaf"],
)
assert len(record) == 1 # check that only one warning was raised
return fig


@pytest.mark.mpl_image_compare
def test_plot3d_ogrgmt_file_multipoint_default_style():
"""
Expand Down