[yt-svn] commit/yt: ChrisMalone: Merged in mzingale/yt/yt-3.0 (pull request #1117)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Sep 2 14:23:31 PDT 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/66661ac7b420/
Changeset:   66661ac7b420
Branch:      yt
User:        ChrisMalone
Date:        2014-09-02 23:23:23
Summary:     Merged in mzingale/yt/yt-3.0 (pull request #1117)

this gets the orientation correct for a volume-rendered image
Affected #:  1 file

diff -r 2c3d2e84074ac8260feb8f056b0720c3a7442e82 -r 66661ac7b4208e71cd9b3ce97f36c1bdc06f5deb yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -649,7 +649,7 @@
             del nz
         else:
             nim = im
-        ax = self._pylab.imshow(nim[:,:,:3]/nim[:,:,:3].max(), origin='lower')
+        ax = self._pylab.imshow(nim[:,:,:3]/nim[:,:,:3].max(), origin='upper')
         return ax
 
     def draw(self):
@@ -747,6 +747,9 @@
         image = ImageArray(self._render(double_check, num_threads, 
                                         image, sampler),
                            info=self.get_information())
+
+        # flip it up/down to handle how the png orientation is donetest.png
+        image = image[:,::-1,:]
         self.save_image(image, fn=fn, clip_ratio=clip_ratio, 
                        transparent=transparent)
         return image

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list