@@ -147,21 +147,22 @@ def test_figure_show():
147
147
148
148
149
149
@pytest .mark .mpl_image_compare
150
- def test_shift_origin ():
150
+ def test_figure_shift_origin ():
151
151
"""
152
152
Test if fig.shift_origin works.
153
153
"""
154
+ kwargs = dict (region = [0 , 3 , 0 , 5 ], projection = "X3c/5c" , frame = 0 )
154
155
fig = Figure ()
155
156
# First call shift_origin without projection and region.
156
- # Test the issue https://github.com/GenericMappingTools/pygmt/issues/514
157
- fig .shift_origin (xshift = "2i " , yshift = "3i " )
158
- fig .basemap (region = "10/70/-300/300" , projection = "X3i/5i" , frame = "af" )
159
- fig .shift_origin (xshift = "4i " )
160
- fig .basemap (region = "10/70/-300/300" , projection = "X3i/5i" , frame = "af" )
161
- fig .shift_origin (yshift = "6i " )
162
- fig .basemap (region = "10/70/-300/300" , projection = "X3i/5i" , frame = "af" )
163
- fig .shift_origin (xshift = "-4i " , yshift = "6i " )
164
- fig .basemap (region = "10/70/-300/300" , projection = "X3i/5i" , frame = "af" )
157
+ # Test issue https://github.com/GenericMappingTools/pygmt/issues/514
158
+ fig .shift_origin (xshift = "2c " , yshift = "3c " )
159
+ fig .basemap (** kwargs )
160
+ fig .shift_origin (xshift = "4c " )
161
+ fig .basemap (** kwargs )
162
+ fig .shift_origin (yshift = "6c " )
163
+ fig .basemap (** kwargs )
164
+ fig .shift_origin (xshift = "-4c " , yshift = "6c " )
165
+ fig .basemap (** kwargs )
165
166
return fig
166
167
167
168
0 commit comments