Skip to content

Commit 9b1d516

Browse files
authored
Figure.plot/plot3d: Remove parameter "sizes", use "size" instead (#1809)
Remove the parameter "sizes" in favour of "size" from `Figure.plot` and `Figure.plot3d`. Deprecation warning was added in v0.4.0 (xref #1254, #1258), and is to be fully removed in v0.6.0.
1 parent 101a57d commit 9b1d516

File tree

4 files changed

+0
-55
lines changed

4 files changed

+0
-55
lines changed

pygmt/src/plot.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
build_arg_string,
88
check_data_input_order,
99
data_kind,
10-
deprecate_parameter,
1110
fmt_docstring,
1211
is_nonstr_iter,
1312
kwargs_to_strings,
@@ -17,7 +16,6 @@
1716

1817

1918
@fmt_docstring
20-
@deprecate_parameter("sizes", "size", "v0.4.0", remove_version="v0.6.0")
2119
@check_data_input_order("v0.5.0", remove_version="v0.7.0")
2220
@use_alias(
2321
A="straight_line",

pygmt/src/plot3d.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
build_arg_string,
88
check_data_input_order,
99
data_kind,
10-
deprecate_parameter,
1110
fmt_docstring,
1211
is_nonstr_iter,
1312
kwargs_to_strings,
@@ -17,7 +16,6 @@
1716

1817

1918
@fmt_docstring
20-
@deprecate_parameter("sizes", "size", "v0.4.0", remove_version="v0.6.0")
2119
@check_data_input_order("v0.5.0", remove_version="v0.7.0")
2220
@use_alias(
2321
A="straight_line",

pygmt/tests/test_plot.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -452,30 +452,6 @@ def test_plot_datetime():
452452
return fig
453453

454454

455-
@pytest.mark.mpl_image_compare(filename="test_plot_sizes.png")
456-
def test_plot_deprecate_sizes_to_size(data, region):
457-
"""
458-
Make sure that the old parameter "sizes" is supported and it reports a
459-
warning.
460-
461-
Modified from the test_plot_sizes() test.
462-
"""
463-
fig = Figure()
464-
with pytest.warns(expected_warning=FutureWarning) as record:
465-
fig.plot(
466-
x=data[:, 0],
467-
y=data[:, 1],
468-
sizes=0.5 * data[:, 2],
469-
region=region,
470-
projection="X10c",
471-
style="cc",
472-
color="blue",
473-
frame="af",
474-
)
475-
assert len(record) == 1 # check that only one warning was raised
476-
return fig
477-
478-
479455
@pytest.mark.mpl_image_compare
480456
def test_plot_ogrgmt_file_multipoint_default_style():
481457
"""

pygmt/tests/test_plot3d.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -423,33 +423,6 @@ def test_plot3d_scalar_xyz():
423423
return fig
424424

425425

426-
@pytest.mark.mpl_image_compare(filename="test_plot3d_sizes.png")
427-
def test_plot3d_deprecate_sizes_to_size(data, region):
428-
"""
429-
Make sure that the old parameter "sizes" is supported and it reports an
430-
warning.
431-
432-
Modified from the test_plot3d_sizes() test.
433-
"""
434-
fig = Figure()
435-
with pytest.warns(expected_warning=FutureWarning) as record:
436-
fig.plot3d(
437-
x=data[:, 0],
438-
y=data[:, 1],
439-
z=data[:, 2],
440-
zscale=5,
441-
perspective=[225, 30],
442-
sizes=0.5 * data[:, 2],
443-
region=region,
444-
projection="X10c",
445-
style="ui",
446-
color="blue",
447-
frame=["af", "zaf"],
448-
)
449-
assert len(record) == 1 # check that only one warning was raised
450-
return fig
451-
452-
453426
@pytest.mark.mpl_image_compare
454427
def test_plot3d_ogrgmt_file_multipoint_default_style():
455428
"""

0 commit comments

Comments
 (0)