[Yt-svn] yt-commit r898 - in trunk: . scripts yt/raven

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Wed Nov 5 22:24:57 PST 2008


Author: mturk
Date: Wed Nov  5 22:24:57 2008
New Revision: 898
URL: http://yt.spacepope.org/changeset/898

Log:
Changed scripts to be entry points instead, removed old cruft in raven, and
killed the now-very-obsolete README in raven.



Removed:
   trunk/scripts/yt_timeseries.py
   trunk/scripts/yt_zoomin.py
   trunk/yt/raven/README
Modified:
   trunk/setup.py
   trunk/yt/raven/PlotTypes.py

Modified: trunk/setup.py
==============================================================================
--- trunk/setup.py	(original)
+++ trunk/setup.py	Wed Nov  5 22:24:57 2008
@@ -54,6 +54,10 @@
         install_requires = ['matplotlib', 'numpy','ipython'],
         extras_require = { 'GUI' : ['wxPython'],
                            'storage' : ['tables'], },
+        entry_points = { 'console_scripts' : [
+                            'yt_timeseries = yt.commands:timeseries',
+                            'yt_zoomin = yt.commands:zoomin']
+                       },
         author="Matthew J. Turk",
         author_email="matthewturk at gmail.com",
         url = "http://yt.enzotools.org/",

Modified: trunk/yt/raven/PlotTypes.py
==============================================================================
--- trunk/yt/raven/PlotTypes.py	(original)
+++ trunk/yt/raven/PlotTypes.py	Wed Nov  5 22:24:57 2008
@@ -30,72 +30,18 @@
 
 import _MPL
 
-# We only get imported if matplotlib was imported successfully
-
-def ClusterFilePlot(cls, x, y, xlog=None, ylog=None, fig=None, filename=None,
-                    format="png", xbounds = None, ybounds = None):
-    """
-
-    """
-    if not fig:
-        from matplotlib.backends.backend_agg import FigureCanvasAgg
-        fig = matplotlib.figure.Figure(figsize=(8,8))
-        canvas = FigureCanvasAgg(fig)
-    ax = fig.add_subplot(111)
-    if not iterable(cls):
-        cls = [cls]
-    if xlog == None:
-        if lagos.CFfieldInfo.has_key(x):
-            xlog = lagos.CFfieldInfo[x][2]
-    if ylog == None:
-        if lagos.CFfieldInfo.has_key(y):
-            ylog = lagos.CFfieldInfo[y][2]
-    if xlog and ylog:
-        pp=ax.loglog
-    elif xlog and not ylog:
-        pp=ax.semilogx
-    elif ylog and not xlog:
-        pp=ax.semilogy
-    else:
-        pp=ax.plot
-
-    fig.hold(True)
-    colors = 'krbgm' * 10
-    for cl, cc in zip(cls, colors):
-        #pp(cl[x],cl[y], lw=2.5)
-        pp(cl[x], cl[y], lw=2.5, color=cc)
-    if lagos.CFfieldInfo.has_key(x):
-        ax.set_xlabel(lagos.CFfieldInfo[x][1], fontsize=18)
-        print lagos.CFfieldInfo[x][1]
-    if lagos.CFfieldInfo.has_key(y):
-        ax.set_ylabel(lagos.CFfieldInfo[y][1], fontsize=18)
-        print lagos.CFfieldInfo[y][1]
-    if xbounds:
-        ax.set_xlim(xbounds)
-    if ybounds:
-        ax.set_ylim(ybounds)
-    ax.axesFrame.set_linewidth(2)
-    for tickLabel in ax.get_xticklabels() + ax.get_yticklabels():
-        tickLabel.set_fontsize(14)
-    if filename:
-        canvas.print_figure(filename, format=format)
-    return fig
-
 engineVals = {}
 
 def Initialize(*args, **kwargs):
     engineVals["initialized"] = True
-    if not kwargs.has_key("canvas"):
+    if 'canvas' in kwargs:
+        FigureCanvas = kwargs["canvas"]
+    else:
         from matplotlib.backends.backend_agg \
                 import FigureCanvasAgg as FigureCanvas
-    else:
-        FigureCanvas = kwargs["canvas"]
     engineVals["canvas"] = FigureCanvas
     return
 
-def CleanUp(*args, **kwargs):
-    pass
-
 class RavenPlot:
 
     datalabel = None



More information about the yt-svn mailing list