Skip to content

Commit 475a95d

Browse files
committed
Add a test to make sure shift_origin does not crash
Closes #514.
1 parent 97a585b commit 475a95d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pygmt/tests/test_figure.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ def test_figure_show():
121121
def test_shift_origin():
122122
"Test if fig.shift_origin works"
123123
fig = Figure()
124+
# First call shift_origin without -J & -R.
125+
# Test the issue https://github.com/GenericMappingTools/pygmt/issues/514
126+
fig.shift_origin(xshift='2i', yshift='3i')
124127
fig.basemap(R="10/70/-300/300", J="X3i/5i", B="af")
125128
fig.shift_origin(xshift="4i")
126129
fig.basemap(R="10/70/-300/300", J="X3i/5i", B="af")

0 commit comments

Comments
 (0)