Skip to content

Figure.contour: Reorder input parameters to 'data, x, y, z' #1561

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

Merged
merged 2 commits into from
Oct 3, 2021
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
8 changes: 5 additions & 3 deletions pygmt/src/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pygmt.clib import Session
from pygmt.helpers import (
build_arg_string,
check_data_input_order,
deprecate_parameter,
fmt_docstring,
kwargs_to_strings,
Expand All @@ -14,6 +15,7 @@

@fmt_docstring
@deprecate_parameter("columns", "incols", "v0.4.0", remove_version="v0.6.0")
@check_data_input_order("v0.5.0", remove_version="v0.7.0")
@use_alias(
A="annotation",
B="frame",
Expand Down Expand Up @@ -41,7 +43,7 @@
t="transparency",
)
@kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence")
def contour(self, x=None, y=None, z=None, data=None, **kwargs):
def contour(self, data=None, x=None, y=None, z=None, **kwargs):
r"""
Contour table data by direct triangulation.

Expand All @@ -56,12 +58,12 @@ def contour(self, x=None, y=None, z=None, data=None, **kwargs):

Parameters
----------
x/y/z : 1d arrays
Arrays of x and y coordinates and values z of the data points.
data : str or {table-like}
Pass in (x, y, z) or (longitude, latitude, elevation) values by
providing a file name to an ASCII data table, a 2D
{table-classes}
x/y/z : 1d arrays
Arrays of x and y coordinates and values z of the data points.
{J}
{R}
annotation : str or int
Expand Down
2 changes: 1 addition & 1 deletion pygmt/tests/test_contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def test_contour_deprecate_columns_to_incols(region):

with pytest.warns(expected_warning=FutureWarning) as record:
fig.contour(
data=data,
data,
projection="X10c",
region=region,
frame="a",
Expand Down