Skip to content

Commit f35d56f

Browse files
authored
Figure.contour: Reorder input parameters to 'data, x, y, z' (#1561)
1 parent b9eb627 commit f35d56f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pygmt/src/contour.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from pygmt.clib import Session
66
from pygmt.helpers import (
77
build_arg_string,
8+
check_data_input_order,
89
deprecate_parameter,
910
fmt_docstring,
1011
kwargs_to_strings,
@@ -14,6 +15,7 @@
1415

1516
@fmt_docstring
1617
@deprecate_parameter("columns", "incols", "v0.4.0", remove_version="v0.6.0")
18+
@check_data_input_order("v0.5.0", remove_version="v0.7.0")
1719
@use_alias(
1820
A="annotation",
1921
B="frame",
@@ -41,7 +43,7 @@
4143
t="transparency",
4244
)
4345
@kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence")
44-
def contour(self, x=None, y=None, z=None, data=None, **kwargs):
46+
def contour(self, data=None, x=None, y=None, z=None, **kwargs):
4547
r"""
4648
Contour table data by direct triangulation.
4749
@@ -56,12 +58,12 @@ def contour(self, x=None, y=None, z=None, data=None, **kwargs):
5658
5759
Parameters
5860
----------
59-
x/y/z : 1d arrays
60-
Arrays of x and y coordinates and values z of the data points.
6161
data : str or {table-like}
6262
Pass in (x, y, z) or (longitude, latitude, elevation) values by
6363
providing a file name to an ASCII data table, a 2D
6464
{table-classes}
65+
x/y/z : 1d arrays
66+
Arrays of x and y coordinates and values z of the data points.
6567
{J}
6668
{R}
6769
annotation : str or int

pygmt/tests/test_contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def test_contour_deprecate_columns_to_incols(region):
9898

9999
with pytest.warns(expected_warning=FutureWarning) as record:
100100
fig.contour(
101-
data=data,
101+
data,
102102
projection="X10c",
103103
region=region,
104104
frame="a",

0 commit comments

Comments
 (0)