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: Reorder input parameters to "data, x, y" #1547

Merged
merged 10 commits into from
Oct 3, 2021
10 changes: 6 additions & 4 deletions pygmt/src/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pygmt.exceptions import GMTInvalidInput
from pygmt.helpers import (
build_arg_string,
check_data_input_order,
data_kind,
deprecate_parameter,
fmt_docstring,
Expand All @@ -18,6 +19,7 @@
@fmt_docstring
@deprecate_parameter("sizes", "size", "v0.4.0", remove_version="v0.6.0")
@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="straight_line",
B="frame",
Expand Down Expand Up @@ -53,7 +55,7 @@
w="wrap",
)
@kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence")
def plot(self, x=None, y=None, data=None, size=None, direction=None, **kwargs):
def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs):
r"""
Plot lines, polygons, and symbols in 2-D.

Expand Down Expand Up @@ -81,14 +83,14 @@ def plot(self, x=None, y=None, data=None, size=None, direction=None, **kwargs):

Parameters
----------
x/y : float or 1d arrays
The x and y coordinates, or arrays of x and y coordinates of the
data points
data : str or {table-like}
Pass in either a file name to an ASCII data table, a 2D
{table-classes}.
Use parameter ``incols`` to choose which columns are x, y, color, and
size, respectively.
x/y : float or 1d arrays
The x and y coordinates, or arrays of x and y coordinates of the
data points
size : 1d array
The size of the data points in units specified using ``style``.
Only valid if using ``x``/``y``.
Expand Down