[Yt-svn] yt-commit r1684 - trunk/yt/raven

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Thu Apr 8 14:53:49 PDT 2010


Author: mturk
Date: Thu Apr  8 14:53:49 2010
New Revision: 1684
URL: http://yt.enzotools.org/changeset/1684

Log:
Adding an add_ray option for adding ray query plots



Modified:
   trunk/yt/raven/PlotCollection.py

Modified: trunk/yt/raven/PlotCollection.py
==============================================================================
--- trunk/yt/raven/PlotCollection.py	(original)
+++ trunk/yt/raven/PlotCollection.py	Thu Apr  8 14:53:49 2010
@@ -452,6 +452,14 @@
                 figure, axes, plot_options=kwargs))
         return p
 
+    def add_ray(self, start_point, end_point, field, axes = None,
+                figure = None, **kwargs):
+        data_source = self.pf.h.ray(start_point, end_point, field)
+        p = self._add_plot(PlotTypes.LineQueryPlot(data_source,
+                ['t', field], self._get_new_id(),
+                figure, axes, plot_options=kwargs))
+        return p
+
     def _get_new_id(self):
         self.__id_counter += 1
         return self.__id_counter-1



More information about the yt-svn mailing list