Revision: 6379
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6379&view=rev
Author: jdh2358
Date: 2008-11-09 00:18:40 +0000 (Sun, 09 Nov 2008)
Log Message:
-----------
commited jae joons 2nd patch; figimage still sems broken for origin=up
Modified Paths:
--------------
trunk/matplotlib/examples/pylab_examples/figimage_demo.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/figure.py
Modified: trunk/matplotlib/examples/pylab_examples/figimage_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/figimage_demo.py 2008-11-09
00:09:23 UTC (rev 6378)
+++ trunk/matplotlib/examples/pylab_examples/figimage_demo.py 2008-11-09
00:18:40 UTC (rev 6379)
@@ -12,9 +12,12 @@
Z.shape = 100,100
Z[:,50:] = 1.
-im1 = plt.figimage(Z, xo=50, yo=0, cmap=cm.jet)
-im2 = plt.figimage(Z, xo=100, yo=100, alpha=.8, cmap=cm.jet)
+im1 = plt.figimage(Z, xo=50, yo=0, cmap=cm.jet, origin='upper')
+im2 = plt.figimage(Z, xo=100, yo=100, alpha=.8, cmap=cm.jet, origin='upper')
+fig.savefig('figimage_demo.png')
+fig.savefig('figimage_demo.svg')
+fig.savefig('figimage_demo.pdf')
plt.show()
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-11-09 00:09:23 UTC (rev
6378)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-11-09 00:18:40 UTC (rev
6379)
@@ -1537,9 +1537,9 @@
for im in self.images if im.get_visible()]
#flip the images if their origin is "upper"
- [im.flipud_out() for _im, (im,_,_) in zip(self.images, ims) \
- if _im.origin=="upper"]
-
+ if self.images[0].origin=='upper':
+ im.flipud_out()
+
l, b, r, t = self.bbox.extents
width = mag*((round(r) + 0.5) - (round(l) - 0.5))
height = mag*((round(t) + 0.5) - (round(b) - 0.5))
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py 2008-11-09 00:09:23 UTC (rev
6378)
+++ trunk/matplotlib/lib/matplotlib/figure.py 2008-11-09 00:18:40 UTC (rev
6379)
@@ -752,11 +752,15 @@
mag = renderer.get_image_magnification()
ims = [(im.make_image(mag), im.ox*mag, im.oy*mag)
for im in self.images]
+
+ for _im, (im,_,_) in zip(self.images, ims):
+ if _im.origin=="upper":
+ im.flipud_out()
+
+
im = _image.from_images(self.bbox.height * mag,
self.bbox.width * mag,
ims)
- if self.images[0].origin=='upper':
- im.flipud_out()
im.is_grayscale = False
l, b, w, h = self.bbox.bounds
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins