@@ -48,7 +48,7 @@ def test_figure_region_country_codes():
48
48
def test_figure_savefig_exists ():
49
49
"Make sure the saved figure has the right name"
50
50
fig = Figure ()
51
- fig .basemap (region = "10/70/-300/800" , J = "X3i/5i" , B = "af" )
51
+ fig .basemap (region = "10/70/-300/800" , projection = "X3i/5i" , frame = "af" )
52
52
prefix = "test_figure_savefig_exists"
53
53
for fmt in "png pdf jpg bmp eps tif" .split ():
54
54
fname = "." .join ([prefix , fmt ])
@@ -60,7 +60,7 @@ def test_figure_savefig_exists():
60
60
def test_figure_savefig_transparent ():
61
61
"Check if fails when transparency is not supported"
62
62
fig = Figure ()
63
- fig .basemap (region = "10/70/-300/800" , J = "X3i/5i" , B = "af" )
63
+ fig .basemap (region = "10/70/-300/800" , projection = "X3i/5i" , frame = "af" )
64
64
prefix = "test_figure_savefig_transparent"
65
65
for fmt in "pdf jpg bmp eps tif" .split ():
66
66
fname = "." .join ([prefix , fmt ])
@@ -112,7 +112,7 @@ def mock_psconvert(*args, **kwargs): # pylint: disable=unused-argument
112
112
def test_figure_show ():
113
113
"Test that show creates the correct file name and deletes the temp dir"
114
114
fig = Figure ()
115
- fig .basemap (R = "10/70/-300/800" , J = "X3i/5i" , B = "af" )
115
+ fig .basemap (region = "10/70/-300/800" , projection = "X3i/5i" , frame = "af" )
116
116
img = fig .show (width = 800 )
117
117
assert img .width == 800
118
118
@@ -121,11 +121,14 @@ def test_figure_show():
121
121
def test_shift_origin ():
122
122
"Test if fig.shift_origin works"
123
123
fig = Figure ()
124
- fig .basemap (R = "10/70/-300/300" , J = "X3i/5i" , B = "af" )
124
+ # First call shift_origin without projection and region.
125
+ # Test the issue https://github.com/GenericMappingTools/pygmt/issues/514
126
+ fig .shift_origin (xshift = "2i" , yshift = "3i" )
127
+ fig .basemap (region = "10/70/-300/300" , projection = "X3i/5i" , frame = "af" )
125
128
fig .shift_origin (xshift = "4i" )
126
- fig .basemap (R = "10/70/-300/300" , J = "X3i/5i" , B = "af" )
129
+ fig .basemap (region = "10/70/-300/300" , projection = "X3i/5i" , frame = "af" )
127
130
fig .shift_origin (yshift = "6i" )
128
- fig .basemap (R = "10/70/-300/300" , J = "X3i/5i" , B = "af" )
131
+ fig .basemap (region = "10/70/-300/300" , projection = "X3i/5i" , frame = "af" )
129
132
fig .shift_origin (xshift = "-4i" , yshift = "6i" )
130
- fig .basemap (R = "10/70/-300/300" , J = "X3i/5i" , B = "af" )
133
+ fig .basemap (region = "10/70/-300/300" , projection = "X3i/5i" , frame = "af" )
131
134
return fig
0 commit comments