[Yt-svn] yt: 2 new changesets

hg at spacepope.org hg at spacepope.org
Thu Aug 5 12:34:59 PDT 2010


hg Repository: yt
details:   yt/rev/ec7a5ebed7ea
changeset: 1911:ec7a5ebed7ea
user:      John Wise <jwise at astro.princeton.edu>
date:
Thu Aug 05 14:46:13 2010 -0400
description:
For streamlines, no need to transpose pixel values.

hg Repository: yt
details:   yt/rev/cbba77a0d476
changeset: 1912:cbba77a0d476
user:      John Wise <jwise at astro.princeton.edu>
date:
Thu Aug 05 15:34:51 2010 -0400
description:
Adding an argument for fine control over which panels have colorbars.
Useful for plots with the same scale.

diffstat:

 yt/extensions/eps_writer.py |  8 +++++++-
 yt/raven/Callbacks.py       |  4 ++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diffs (52 lines):

diff -r 2ae1dc5b28c0 -r cbba77a0d476 yt/extensions/eps_writer.py
--- a/yt/extensions/eps_writer.py	Tue Aug 03 18:30:51 2010 -0400
+++ b/yt/extensions/eps_writer.py	Thu Aug 05 15:34:51 2010 -0400
@@ -695,7 +695,8 @@
 def multiplot(ncol, nrow, yt_plots=None, images=None, xranges=None,
               yranges=None, xlabels=None, ylabels=None, colorbars=None,
               shrink_cb=0.95, figsize=(8,8), margins=(0,0), titles=None,
-              savefig=None, yt_nocbar=False, bare_axes=False):
+              savefig=None, yt_nocbar=False, bare_axes=False,
+              cb_flags=None):
     r"""Convenience routine to create a multi-panel figure from yt plots or
     JPEGs.  The images are first placed from the origin, and then
     bottom-to-top and left-to-right.
@@ -736,6 +737,8 @@
     bare_axes : boolean
         Set to true to have no annotations or tick marks on all of the
         axes.
+    cb_flags : list of booleans
+        Flags for each plot to have a colorbar or not.
 
     Examples
     --------
@@ -835,6 +838,9 @@
             xpos0 = i*(figsize[0] + margins[0])
             index = j*ncol + i
             if (not _yt and colorbars != None) or (_yt and not yt_nocbar):
+                if cb_flags != None:
+                    if cb_flags[index] == False:
+                        continue
                 if _yt or colorbars[index] != None:
                     if ncol == 1:
                         orientation = "right"
diff -r 2ae1dc5b28c0 -r cbba77a0d476 yt/raven/Callbacks.py
--- a/yt/raven/Callbacks.py	Tue Aug 03 18:30:51 2010 -0400
+++ b/yt/raven/Callbacks.py	Thu Aug 05 15:34:51 2010 -0400
@@ -308,14 +308,14 @@
                              plot.data['pdy'],
                              plot.data[self.field_x],
                              int(nx), int(ny),
-                           (x0, x1, y0, y1),).transpose()
+                           (x0, x1, y0, y1),)
         pixY = _MPL.Pixelize(plot.data['px'],
                              plot.data['py'],
                              plot.data['pdx'],
                              plot.data['pdy'],
                              plot.data[self.field_y],
                              int(nx), int(ny),
-                           (x0, x1, y0, y1),).transpose()
+                           (x0, x1, y0, y1),)
         r0 = na.mgrid[self.xstart[0]*nx:self.xstart[1]*nx:self.data_size[0]*1j,
                       self.ystart[0]*ny:self.ystart[1]*ny:self.data_size[1]*1j]
         lines = na.zeros((self.nsample, 2, self.data_size[0], self.data_size[1]))



More information about the yt-svn mailing list