[Yt-svn] yt-commit r1339 - branches/yt-1.5/doc branches/yt-1.5/yt/raven trunk/yt/raven
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Tue Jun 16 12:08:23 PDT 2009
Author: mturk
Date: Tue Jun 16 12:08:23 2009
New Revision: 1339
URL: http://yt.spacepope.org/changeset/1339
Log:
Added the TitleCallback from Dave Collins and updated the docs
Modified:
branches/yt-1.5/doc/docs_html.zip
branches/yt-1.5/yt/raven/Callbacks.py
trunk/yt/raven/Callbacks.py
Modified: branches/yt-1.5/doc/docs_html.zip
==============================================================================
Binary files. No diff available.
Modified: branches/yt-1.5/yt/raven/Callbacks.py
==============================================================================
--- branches/yt-1.5/yt/raven/Callbacks.py (original)
+++ branches/yt-1.5/yt/raven/Callbacks.py Tue Jun 16 12:08:23 2009
@@ -862,3 +862,16 @@
region = data.pf.h.periodic_region(
data.center, LE, RE)
return region
+
+class TitleCallback(PlotCallback):
+ _type_name = "title"
+ def __init__(self, title="Plot"):
+ """
+ Accepts a *title* and adds it to the plot
+ """
+ PlotCallback.__init__(self)
+ self.title = title
+
+ def __call__(self,plot):
+ plot._axes.set_title(self.title)
+
Modified: trunk/yt/raven/Callbacks.py
==============================================================================
--- trunk/yt/raven/Callbacks.py (original)
+++ trunk/yt/raven/Callbacks.py Tue Jun 16 12:08:23 2009
@@ -862,3 +862,16 @@
region = data.pf.h.periodic_region(
data.center, LE, RE)
return region
+
+class TitleCallback(PlotCallback):
+ _type_name = "title"
+ def __init__(self, title="Plot"):
+ """
+ Accepts a *title* and adds it to the plot
+ """
+ PlotCallback.__init__(self)
+ self.title = title
+
+ def __call__(self,plot):
+ plot._axes.set_title(self.title)
+
More information about the yt-svn
mailing list