Commits

Sam Skillman committed b75588a

Fixing reason plots, as reported by Bryan in irc.

Comments (0)

Files changed (2)

yt/gui/reason/widget_store.py

         sl = pf.h.slice(axis, coord, center = center, periodic = True)
         xax, yax = x_dict[axis], y_dict[axis]
         DLE, DRE = pf.domain_left_edge, pf.domain_right_edge
-        pw = PWViewerExtJS(sl, (DLE[xax], DRE[xax], DLE[yax], DRE[yax]), setup = False)
+        pw = PWViewerExtJS(sl, (DLE[xax], DRE[xax], DLE[yax], DRE[yax]), 
+                           setup = False, plot_type='SlicePlot')
         pw.set_current_field(field)
         field_list = list(set(pf.h.field_list + pf.h.derived_field_list))
         field_list = [dict(text = f) for f in sorted(field_list)]
         xax, yax = x_dict[axis], y_dict[axis]
         DLE, DRE = pf.domain_left_edge, pf.domain_right_edge
         pw = PWViewerExtJS(proj, (DLE[xax], DRE[xax], DLE[yax], DRE[yax]),
-                           setup = False)
+                           setup = False, plot_type='ProjectionPlot')
         pw.set_current_field(field)
         field_list = list(set(pf.h.field_list + pf.h.derived_field_list))
         field_list = [dict(text = f) for f in sorted(field_list)]

yt/visualization/plot_window.py

     """A viewer for PlotWindows.
 
     """
+    _plot_type = None
     def __init__(self, *args,**kwargs):
         setup = kwargs.pop("setup", True)
+        if self._plot_type is None:
+            self._plot_type = kwargs.pop("plot_type")
         PlotWindow.__init__(self, *args,**kwargs)
         self._axes_unit_names = None
         self._callbacks = []