|
7 | 7 | from pygmt.helpers.testing import check_figures_equal
|
8 | 8 |
|
9 | 9 |
|
10 |
| -@check_figures_equal() |
| 10 | +@pytest.mark.mpl_image_compare |
11 | 11 | def test_subplot_basic_frame():
|
12 | 12 | """
|
13 | 13 | Create a subplot figure with 1 vertical row and 2 horizontal columns, and
|
14 | 14 | ensure map frame setting is applied to all subplot figures.
|
15 | 15 | """
|
16 |
| - fig_ref, fig_test = Figure(), Figure() |
17 |
| - with fig_ref.subplot(nrows=1, ncols=2, Ff="6c/3c", B="WSne"): |
18 |
| - with fig_ref.set_panel(panel=0): |
19 |
| - fig_ref.basemap(region=[0, 3, 0, 3], frame="+tplot0") |
20 |
| - with fig_ref.set_panel(panel=1): |
21 |
| - fig_ref.basemap(region=[0, 3, 0, 3], frame="+tplot1") |
22 |
| - with fig_test.subplot(nrows=1, ncols=2, figsize=("6c", "3c"), frame="WSne"): |
23 |
| - with fig_test.set_panel(panel="0,0"): |
24 |
| - fig_test.basemap(region=[0, 3, 0, 3], frame="+tplot0") |
25 |
| - with fig_test.set_panel(panel=[0, 1]): |
26 |
| - fig_test.basemap(region=[0, 3, 0, 3], frame="+tplot1") |
27 |
| - return fig_ref, fig_test |
| 16 | + fig = Figure() |
| 17 | + |
| 18 | + with fig.subplot(nrows=1, ncols=2, figsize=("6c", "3c"), frame="WSne"): |
| 19 | + with fig.set_panel(panel="0,0"): |
| 20 | + fig.basemap(region=[0, 3, 0, 3], frame="+tplot0") |
| 21 | + with fig.set_panel(panel=[0, 1]): |
| 22 | + fig.basemap(region=[0, 3, 0, 3], frame="+tplot1") |
| 23 | + return fig |
28 | 24 |
|
29 | 25 |
|
30 | 26 | @check_figures_equal()
|
|
0 commit comments