Skip to content

Commit

Permalink
Figure.rose: Reorder input parameters to 'data, length, azimuth' (Gen…
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgrund authored and Josh Sixsmith committed Dec 21, 2022
1 parent 34349c7 commit 43be44e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions pygmt/src/rose.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="sector",
B="frame",
Expand Down Expand Up @@ -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.
Expand All @@ -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}.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pygmt/tests/test_rose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 43be44e

Please sign in to comment.