[Yt-svn] yt: Merging from yt into RAMSES

hg at spacepope.org hg at spacepope.org
Tue Aug 10 11:38:36 PDT 2010


hg Repository: yt
details:   yt/rev/1a41f279610f
changeset: 1925:1a41f279610f
user:      Matthew Turk <matthewturk at gmail.com>
date:
Tue Aug 10 11:38:25 2010 -0700
description:
Merging from yt into RAMSES

diffstat:

 yt/extensions/eps_writer.py |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r ed1a7300a088 -r 1a41f279610f yt/extensions/eps_writer.py
--- a/yt/extensions/eps_writer.py	Tue Aug 10 11:23:22 2010 -0700
+++ b/yt/extensions/eps_writer.py	Tue Aug 10 11:38:25 2010 -0700
@@ -316,6 +316,8 @@
         >>> d.save_fig()
         """
         image = pyx.bitmap.jpegimage(filename)
+        if self.canvas is None:
+            self.canvas = pyx.canvas.canvas()
         self.canvas.insert(pyx.bitmap.bitmap(pos[0], pos[1], image,
                                              compressmode=None,
                                              width=self.figsize[0],
@@ -750,7 +752,8 @@
     >>> cbs.append(return_cmap("hot", r"Entropy [K cm$^2$]", (1e-2,1e6), True))
     >>> cbs.append(return_cmap("Spectral", "Stuff$_x$!", (1,300), True))
     >>> 
-    >>> mp = multiplot(images,2,2, margins=(0.1,0.1), titles=["1","2","3","4"],
+    >>> mp = multiplot(2,2, images=images, margins=(0.1,0.1),
+    >>>                titles=["1","2","3","4"],
     >>>                xlabels=["one","two"], ylabels=None, colorbars=cbs,
     >>>                shrink_cb=0.95)
     >>> mp.scale_line(label="$r_{vir}$", labelloc="top")
@@ -774,6 +777,8 @@
         print "Given both images and yt plots.  Ignoring images."
     if yt_plots != None:
         _yt = True
+    else:
+        _yt = False
 
     # If no ranges or labels given and given only images, fill them in.
     if not _yt:
@@ -823,7 +828,7 @@
             if titles != None:
                 if titles[index] != None:
                     d.title_box(titles[index],
-                                loc=(i+0.02+i*margins[0]/figsize[0],
+                                loc=(i+0.05+i*margins[0]/figsize[0],
                                      j+0.98+j*margins[1]/figsize[1]))
 
     # Insert colorbars after all axes are placed because we want to



More information about the yt-svn mailing list