diff --git a/pygmt/src/rose.py b/pygmt/src/rose.py index e789b2cd702..8089a8510a7 100644 --- a/pygmt/src/rose.py +++ b/pygmt/src/rose.py @@ -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, @@ -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="sector", B="frame", @@ -47,7 +49,7 @@ w="wrap", ) @kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence") -def rose(self, length=None, azimuth=None, data=None, **kwargs): +def rose(self, data=None, length=None, azimuth=None, **kwargs): """ Plot windrose diagrams or polar histograms. @@ -67,10 +69,6 @@ def rose(self, length=None, azimuth=None, data=None, **kwargs): Parameters ---------- - length/azimuth : float or 1d arrays - Length and azimuth values, or arrays of length and azimuth - values - data : str or {table-like} Pass in either a file name to an ASCII data table, a 2D {table-classes}. @@ -79,6 +77,10 @@ def rose(self, length=None, azimuth=None, data=None, **kwargs): indicate the single column with azimuths; then all lengths are set to unity (see ``scale = 'u'`` to set actual lengths to unity as well). + length/azimuth : float or 1d arrays + Length and azimuth values, or arrays of length and azimuth + values + orientation : bool Specifies that the input data are orientation data (i.e., have a 180 degree ambiguity) instead of true 0-360 degree directions diff --git a/pygmt/tests/test_rose.py b/pygmt/tests/test_rose.py index 4460c5f6473..4804428e7ca 100644 --- a/pygmt/tests/test_rose.py +++ b/pygmt/tests/test_rose.py @@ -202,7 +202,7 @@ def test_rose_deprecate_columns_to_incols(data_fractures_compilation): fig = Figure() with pytest.warns(expected_warning=FutureWarning) as record: fig.rose( - data=data, + data, region=[0, 1, 0, 360], sector=10, columns=[1, 0],