Revision: 8027
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8027&view=rev
Author: jouni
Date: 2009-12-13 19:19:28 +0000 (Sun, 13 Dec 2009)
Log Message:
-----------
Add test for figimage bug
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/tests/test_image.py
Modified: trunk/matplotlib/lib/matplotlib/tests/test_image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/tests/test_image.py 2009-12-13 12:06:07 UTC
(rev 8026)
+++ trunk/matplotlib/lib/matplotlib/tests/test_image.py 2009-12-13 19:19:28 UTC
(rev 8027)
@@ -29,6 +29,25 @@
fig.savefig('image_interps')
+...@image_comparison(baseline_images=['figimage-0', 'figimage-1'],
extensions=['png'])
+def test_figimage():
+ 'test the figimage method'
+
+ for suppressComposite in False, True:
+ fig = plt.figure(figsize=(2,2), dpi=100)
+ fig.suppressComposite=suppressComposite
+ x,y = np.ix_(np.arange(100.0)/100.0, np.arange(100.0)/100.0)
+ z = np.sin(x**2 + y**2 - x*y)
+ c = np.sin(20*x**2 + 50*y**2)
+ img = z + c/5
+
+ fig.figimage(img, xo=0, yo=0, origin='lower')
+ fig.figimage(img, xo=0, yo=100, origin='upper')
+ fig.figimage(img[:,::-1], xo=100, yo=0, origin='lower')
+ fig.figimage(img[:,::-1], xo=100, yo=100, origin='upper')
+
+ fig.savefig('figimage-%d' % int(suppressComposite), dpi=100)
+
def test_image_python_io():
fig = plt.figure()
ax = fig.add_subplot(111)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins