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

Skip to content

Commit a5138b9

Browse files
committed
Fix figimage test to really exercise both branches in figure.draw
svn path=/trunk/matplotlib/; revision=8029
1 parent b2cf412 commit a5138b9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/matplotlib/tests/test_image.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ def test_figimage():
3535

3636
for suppressComposite in False, True:
3737
fig = plt.figure(figsize=(2,2), dpi=100)
38-
fig.suppressComposite=suppressComposite
38+
fig.suppressComposite = suppressComposite
3939
x,y = np.ix_(np.arange(100.0)/100.0, np.arange(100.0)/100.0)
4040
z = np.sin(x**2 + y**2 - x*y)
4141
c = np.sin(20*x**2 + 50*y**2)
4242
img = z + c/5
4343

4444
fig.figimage(img, xo=0, yo=0, origin='lower')
45-
fig.figimage(img, xo=0, yo=100, origin='upper')
45+
fig.figimage(img[::-1,:], xo=0, yo=100, origin='lower')
4646
fig.figimage(img[:,::-1], xo=100, yo=0, origin='lower')
47-
fig.figimage(img[:,::-1], xo=100, yo=100, origin='upper')
47+
fig.figimage(img[::-1,::-1], xo=100, yo=100, origin='lower')
4848

4949
fig.savefig('figimage-%d' % int(suppressComposite), dpi=100)
5050

0 commit comments

Comments
 (0)