diff --git a/pygmt/tests/test_rose.py b/pygmt/tests/test_rose.py index 45e3f6092cd..4460c5f6473 100644 --- a/pygmt/tests/test_rose.py +++ b/pygmt/tests/test_rose.py @@ -20,7 +20,10 @@ def fixture_data(): @pytest.fixture(scope="module", name="data_fractures_compilation") def fixture_data_fractures_compilation(): """ - Load the sample fractures compilation dataset. + Load the sample fractures compilation dataset which contains fracture + lengths and azimuths as hypothetically digitized from geological maps. + + Lengths are stored in the first column, azimuths in the second. """ return load_fractures_compilation() @@ -38,7 +41,6 @@ def test_rose_data_file(data_fractures_compilation): diameter="5.5c", color="blue", frame=["x0.2g0.2", "y30g30", "+glightgray"], - incols=[1, 0], pen="1p", norm="", scale=0.4, @@ -115,9 +117,8 @@ def test_rose_plot_data_using_cpt(data): @pytest.mark.mpl_image_compare def test_rose_plot_with_transparency(data_fractures_compilation): """ - Test supplying a data file containing a list of fracture lengths and - azimuth as digitized from geological maps to the data argument (lengths are - stored in the second column, azimuths in the first, specify via columns). + Test supplying the sample fractures compilation dataset to the data + parameter. Use transparency. """ @@ -129,7 +130,6 @@ def test_rose_plot_with_transparency(data_fractures_compilation): diameter="5.5c", color="blue", frame=["x0.2g0.2", "y30g30", "+glightgray"], - incols=[1, 0], pen="1p", norm=True, scale=0.4, @@ -141,9 +141,8 @@ def test_rose_plot_with_transparency(data_fractures_compilation): @pytest.mark.mpl_image_compare def test_rose_no_sectors(data_fractures_compilation): """ - Test supplying a data file containing a list of fracture lengths and - azimuth as digitized from geological maps to the data argument (lengths are - stored in the second column, azimuths in the first, specify via columns). + Test supplying the sample fractures compilation dataset to the data + parameter. Plot data without defining a sector width, add a title and rename labels. """ @@ -151,7 +150,6 @@ def test_rose_no_sectors(data_fractures_compilation): fig.rose( data=data_fractures_compilation, region=[0, 500, 0, 360], - incols="1,0", diameter="10c", labels="180/0/90/270", frame=["xg100", "yg45", "+t'Windrose diagram'"], @@ -165,9 +163,8 @@ def test_rose_no_sectors(data_fractures_compilation): @pytest.mark.mpl_image_compare def test_rose_bools(data_fractures_compilation): """ - Test supplying a data file containing a list of fracture lengths and - azimuth as digitized from geological maps to the data argument (lengths are - stored in the second column, azimuths in the first, specify via columns). + Test supplying the sample fractures compilation dataset to the data + parameter. Test bools. """ @@ -176,7 +173,6 @@ def test_rose_bools(data_fractures_compilation): data=data_fractures_compilation, region=[0, 1, 0, 360], sector=10, - incols=[1, 0], diameter="10c", frame=["x0.2g0.2", "y30g30", "+glightgray"], color="red3", @@ -198,10 +194,15 @@ def test_rose_deprecate_columns_to_incols(data_fractures_compilation): Modified from the test_rose_bools() test. """ + + # swap data column order of the sample fractures compilation dataset, + # as the use of the 'columns' parameter will reverse this action + data = data_fractures_compilation[["azimuth", "length"]] + fig = Figure() with pytest.warns(expected_warning=FutureWarning) as record: fig.rose( - data=data_fractures_compilation, + data=data, region=[0, 1, 0, 360], sector=10, columns=[1, 0],