[yt-svn] commit/yt: MatthewTurk: Adding a climp option to the HEALPixCamera.snapshot function.

Bitbucket commits-noreply at bitbucket.org
Thu Mar 22 12:50:52 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/a5af0cffb818/
changeset:   a5af0cffb818
branch:      yt
user:        MatthewTurk
date:        2012-03-22 20:50:44
summary:     Adding a climp option to the HEALPixCamera.snapshot function.
affected #:  1 file

diff -r 1cadfdb2c231539819313750fe22e3b25f099e74 -r a5af0cffb818b55d380553b5f05d340053e3bb99 yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -680,7 +680,7 @@
         self.use_kd = isinstance(volume, AMRKDTree)
         self.volume = volume
 
-    def snapshot(self, fn = None):
+    def snapshot(self, fn = None, clim = None):
         nv = 12*self.nside**2
         image = na.zeros((nv,1,3), dtype='float64', order='C')
         vs = arr_pix2vec_nest(self.nside, na.arange(nv))
@@ -718,6 +718,7 @@
             implot = ax.imshow(img, extent=(-pi,pi,-pi/2,pi/2), clip_on=False, aspect=0.5)
             cb = fig.colorbar(implot, orientation='horizontal')
             cb.set_label(r"$\mathrm{log}\/\mathrm{Column}\/\mathrm{Density}\/[\mathrm{g}/\mathrm{cm}^2]$")
+            if clim is not None: cb.set_clim(*clim)
             ax.xaxis.set_ticks(())
             ax.yaxis.set_ticks(())
             canvas = matplotlib.backends.backend_agg.FigureCanvasAgg(fig)

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