Skip to content

Commit

Permalink
Update the test_subplot_outside_plotting_positioning test and increas…
Browse files Browse the repository at this point in the history
…e the RMS tolerance (#2454)

Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
  • Loading branch information
seisman and weiji14 authored Mar 24, 2023
1 parent 3eabb99 commit c6f0ec9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pygmt/tests/test_subplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ def test_subplot_nrows_ncols_less_than_one_error():
pass


@pytest.mark.mpl_image_compare
# Increase tolerance for compatibility with GMT 6.3 and 6.4, see
# https://github.com/GenericMappingTools/pygmt/pull/2454
@pytest.mark.mpl_image_compare(tolerance=4.0)
def test_subplot_outside_plotting_positioning():
"""
Plotting calls are correctly positioned after exiting subplot.
Expand All @@ -112,7 +114,7 @@ def test_subplot_outside_plotting_positioning():
"""
fig = Figure()
with fig.subplot(nrows=1, ncols=2, figsize=(10, 5)):
fig.basemap(region=[0, 10, 0, 10], projection="X?", frame=True, panel=True)
fig.basemap(region=[0, 10, 0, 10], projection="X?", frame=True, panel=True)
fig.basemap(region=[0, 10, 0, 10], projection="X?", panel=True)
fig.basemap(region=[0, 10, 0, 10], projection="X?", panel=True)
fig.colorbar(position="JBC+w5c+h", cmap="turbo", frame=True)
return fig

0 comments on commit c6f0ec9

Please sign in to comment.