[Yt-svn] yt: 2 new changesets
hg at spacepope.org
hg at spacepope.org
Tue Aug 10 07:57:27 PDT 2010
hg Repository: yt
details: yt/rev/6f8cbcdad7b1
changeset: 1919:6f8cbcdad7b1
user: John Wise <jwise at astro.princeton.edu>
date:
Tue Aug 10 06:54:29 2010 -0400
description:
Fixes to get eps_writer.multiplot working for JPEG input again.
hg Repository: yt
details: yt/rev/a60fc3eb64ea
changeset: 1920:a60fc3eb64ea
user: John Wise <jwise at astro.princeton.edu>
date:
Tue Aug 10 10:56:17 2010 -0400
description:
Merging with latest changes.
diffstat:
yt/extensions/eps_writer.py | 9 +++++++--
yt/lagos/BaseGridType.py | 3 ++-
2 files changed, 9 insertions(+), 3 deletions(-)
diffs (53 lines):
diff -r cbba77a0d476 -r a60fc3eb64ea yt/extensions/eps_writer.py
--- a/yt/extensions/eps_writer.py Thu Aug 05 15:34:51 2010 -0400
+++ b/yt/extensions/eps_writer.py Tue Aug 10 10:56:17 2010 -0400
@@ -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
diff -r cbba77a0d476 -r a60fc3eb64ea yt/lagos/BaseGridType.py
--- a/yt/lagos/BaseGridType.py Thu Aug 05 15:34:51 2010 -0400
+++ b/yt/lagos/BaseGridType.py Tue Aug 10 10:56:17 2010 -0400
@@ -60,7 +60,8 @@
if self.start_index != None:
return self.start_index
if self.Parent == None:
- start_index = self.LeftEdge / self.dds
+ iLE = self.LeftEdge - self.pf["DomainLeftEdge"]
+ start_index = iLE / self.dds
return na.rint(start_index).astype('int64').ravel()
pdx = self.Parent.dds
start_index = (self.Parent.get_global_startindex()) + \
More information about the yt-svn
mailing list