Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67eb71d

Browse files
committed
Merge pull request #3 from mdboom/fix-image-shift
Add test for #1150.
2 parents 96ac546 + 46cd29a commit 67eb71d

File tree

3 files changed

+221
-0
lines changed

3 files changed

+221
-0
lines changed
Binary file not shown.
Lines changed: 206 additions & 0 deletions
Loading

lib/matplotlib/tests/test_image.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,21 @@ def test_no_interpolation_origin():
160160
ax = fig.add_subplot(212)
161161
ax.imshow(np.arange(100).reshape((2, 50)), interpolation='none')
162162

163+
@image_comparison(baseline_images=['image_shift'], remove_text=True,
164+
extensions=['pdf', 'svg'])
165+
def test_image_shift():
166+
from matplotlib.colors import LogNorm
167+
168+
imgData = [[1.0/(x) + 1.0/(y) for x in range(1,100)] for y in range(1,100)]
169+
tMin=734717.945208
170+
tMax=734717.946366
171+
172+
fig = plt.figure()
173+
ax = fig.add_subplot(111)
174+
ax.imshow(imgData, norm=LogNorm(), interpolation='none',
175+
extent=(tMin, tMax, 1, 100))
176+
ax.set_aspect('auto')
177+
163178
if __name__=='__main__':
164179
import nose
165180
nose.runmodule(argv=['-s','--with-doctest'], exit=False)

0 commit comments

Comments
 (0)