[Yt-svn] yt-commit r810 - trunk/yt/raven
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Tue Sep 30 22:36:04 PDT 2008
Author: mturk
Date: Tue Sep 30 22:36:03 2008
New Revision: 810
URL: http://yt.spacepope.org/changeset/810
Log:
Slightly more intelligent data-source gathering.
Modified:
trunk/yt/raven/PlotCollection.py
Modified: trunk/yt/raven/PlotCollection.py
==============================================================================
--- trunk/yt/raven/PlotCollection.py (original)
+++ trunk/yt/raven/PlotCollection.py Tue Sep 30 22:36:03 2008
@@ -182,7 +182,11 @@
def add_particles(self, axis, width, p_size=1.0, col='k', stride=1.0,
data_source=None):
- if data_source is None: data_source = self.pf.h.sphere([0.5]*3,1)
+ LE = self.pf["DomainLeftEdge"].copy()
+ RE = self.pf["DomainRightEdge"].copy()
+ LE[axis] = self.c[axis] - width/2.0
+ RE[axis] = self.c[axis] + width/2.0
+ if data_source is None: data_source = self.pf.h.region(self.c, LE, RE)
p = self._add_plot(PlotTypes.ParticlePlot(data_source, axis,
width, p_size, col, stride))
p["Axis"] = lagos.axis_names[axis]
More information about the yt-svn
mailing list