Index: guiframe/local_perspectives/plotting/AzimutSlicer.py
===================================================================
--- guiframe/local_perspectives/plotting/AzimutSlicer.py	(revision ef0c1700493953c0ec4b1091779caf8c5177bf15)
+++ guiframe/local_perspectives/plotting/AzimutSlicer.py	(revision 54cc36ad4f87967b7af0579e5ddc0d69d0bf199d)
@@ -26,5 +26,5 @@
         self.markers = []
         self.axes = axes
-        self.qmax = self.base.qmax
+        self.qmax = self.base.data2D.xmax
         self.connect = self.base.connect
         
@@ -42,8 +42,8 @@
         self.inner_circle = ArcInteractor(self, self.base.subplot, zorder=zorder, r=self.qmax/2.0,theta1= theta1,
                                            theta2=theta2)
-        self.inner_circle.qmax = self.base.qmax
+        self.inner_circle.qmax = self.qmax
         self.outer_circle = ArcInteractor(self, self.base.subplot, zorder=zorder+1, r=self.qmax/1.8,theta1= theta1,
                                            theta2=theta2)
-        self.outer_circle.qmax = self.base.qmax*1.2
+        self.outer_circle.qmax = self.qmax*1.2
         #self.outer_circle.set_cursor(self.base.qmax/1.8, 0)
         from Edge import RadiusInteractor
Index: guiframe/local_perspectives/plotting/LineSlicer.py
===================================================================
--- guiframe/local_perspectives/plotting/LineSlicer.py	(revision ef0c1700493953c0ec4b1091779caf8c5177bf15)
+++ guiframe/local_perspectives/plotting/LineSlicer.py	(revision 54cc36ad4f87967b7af0579e5ddc0d69d0bf199d)
@@ -29,7 +29,7 @@
         self.axes = axes
         self._mouse_x = 0
-        self._mouse_y = self.base.qmax/2
+        self._mouse_y = self.base.data2D.xmax/2
         self._save_x  = 0
-        self._save_y  = self.base.qmax/2
+        self._save_y  = self.base.data2D.xmax/2
         self.scale = 10.0
         
Index: guiframe/local_perspectives/plotting/Plotter2D.py
===================================================================
--- guiframe/local_perspectives/plotting/Plotter2D.py	(revision ffd23b50a217b6b70d069bda563e2e42824e88f7)
+++ guiframe/local_perspectives/plotting/Plotter2D.py	(revision 54cc36ad4f87967b7af0579e5ddc0d69d0bf199d)
@@ -32,5 +32,6 @@
 import pylab
 from Plotter1D import PanelMenu
-
+#import boxSum
+from sans.guicomm.events import EVT_SLICER_PARS_UPDATE
 class ModelPanel2D( ModelPanel1D):
     """
@@ -71,20 +72,5 @@
         # Beam stop
         self.beamstop_radius = DEFAULT_BEAM
-        # Slicer
-        """
-        if data2d.xmax==None:
-            data2d.xmax=DEFAULT_QMAX+self.qstep*0.01
-        
-        self.qmax = data2d.xmax
-        if data2d.ymax==None:
-            data2d.ymax=DEFAULT_QMAX+self.qstep*0.01
-        self.imax = data2d.ymax
-        """
-        #self.radius = math.sqrt(data2d.)
-        #self.qstep = DEFAULT_QSTEP
-        #print "panel2D qmax",self.qmax,
-        
-        #self.x = pylab.arange(-1*self.qmax, self.qmax+self.qstep*0.01, self.qstep)
-        #self.y = pylab.arange(-1*self.imax, self.imax+self.qstep*0.01, self.qstep)
+       
         self.slicer_z = 5
         self.slicer = None
@@ -92,5 +78,6 @@
         self.axes_frozen = False
         
-       
+        self.panel_slicer=None
+        #self.parent.Bind(EVT_SLICER_PARS, self.onParamChange)
         ## Graph        
         self.graph = Graph()
@@ -98,5 +85,13 @@
         self.graph.yaxis("\\rm{Intensity} ","cm^{-1}")
         self.graph.render(self)
-  
+        #self.Bind(boxSum.EVT_SLICER_PARS_UPDATE, self._onEVT_SLICER_PARS)
+        self.Bind(EVT_SLICER_PARS_UPDATE, self._onEVT_SLICER_PARS)
+        
+        
+    def _onEVT_SLICER_PARS(self, event):
+        print "box move plotter2D", event.type, event.params
+        self.panel_slicer.set_slicer(event.type, event.params)
+        from sans.guicomm.events import SlicerPanelEvent
+        wx.PostEvent(self.parent, SlicerPanelEvent (panel= self.panel_slicer))
     def _onEVT_1DREPLOT(self, event):
         """
@@ -308,12 +303,9 @@
         event = self._getEmptySlicerEvent()
         event.type = self.slicer.__class__.__name__
-        print "event.type",event.type
+        
         event.obj_class = self.slicer.__class__
         event.params = self.slicer.get_params()
-        try:
-            event.result= self.slicer.get_result()
-        except:
-            event.result= None
-        print "event.result", event.result
+        print "Plotter2D: event.type",event.type,event.params, self.parent
+        
         wx.PostEvent(self.parent, event)
 
@@ -390,12 +382,38 @@
         from boxSum import BoxSum
         self.onClearSlicer(event)
-        wx.PostEvent(self.parent, InternalEvent(slicer= BoxSum))
+        #wx.PostEvent(self.parent, InternalEvent(slicer= BoxSum))
+        if not self.slicer == None:  
+            self.slicer.clear()             
+        self.slicer_z += 1
+        self.slicer =  BoxSum(self, self.subplot, zorder=self.slicer_z)
+        print "come here"
+        self.subplot.set_ylim(self.data2D.ymin, self.data2D.ymax)
+        self.subplot.set_xlim(self.data2D.xmin, self.data2D.xmax)
+       
+        self.update()
+        self.slicer.update()
+        
+        # Post slicer event
+        event = self._getEmptySlicerEvent()
+        event.type = self.slicer.__class__.__name__
+        
+        
+        event.obj_class = self.slicer.__class__
+        event.params = self.slicer.get_params()
+        print "Plotter2D: event.type",event.type,event.params, self.parent
         
         from slicerpanel import SlicerPanel
-        new_panel = SlicerPanel(self.parent, -1, style=wx.RAISED_BORDER)
-        
-        from sans.guicomm.events import SlicerParameterEvent 
-        wx.PostEvent(self.parent, SlicerParameterEvent (panel= new_panel))
-            
+        new_panel = SlicerPanel(parent= self.parent,id= -1,type=event.type,
+                                 params=event.params, style=wx.RAISED_BORDER)
+        #new_panel.set_slicer(self.slicer.__class__.__name__,
+        new_panel.window_caption=self.slicer.__class__.__name__+" "+ str(self.data2D.name)
+       
+        self.panel_slicer= new_panel
+        
+        wx.PostEvent(self.panel_slicer, event)
+        from sans.guicomm.events import SlicerPanelEvent
+        wx.PostEvent(self.parent, SlicerPanelEvent (panel= self.panel_slicer))
+        print "finish box sum"
+        
     def onBoxavgX(self,event):
         from boxSlicer import BoxInteractorX
@@ -406,6 +424,6 @@
         new_panel = SlicerPanel(self.parent, -1, style=wx.RAISED_BORDER)
         
-        from sans.guicomm.events import SlicerParameterEvent 
-        wx.PostEvent(self.parent, SlicerParameterEvent (panel= new_panel))
+        from sans.guicomm.events import SlicerPanelEvent
+        wx.PostEvent(self.parent, SlicerPanelEvent (panel= new_panel))
         
     def onBoxavgY(self,event):
Index: guiframe/local_perspectives/plotting/SectorSlicer.py
===================================================================
--- guiframe/local_perspectives/plotting/SectorSlicer.py	(revision fbd0bece49bcbdf4dae88de8d3c8d28fa5a1b434)
+++ guiframe/local_perspectives/plotting/SectorSlicer.py	(revision 54cc36ad4f87967b7af0579e5ddc0d69d0bf199d)
@@ -152,5 +152,5 @@
         phimin = self.right_line.theta+math.pi
         phimax = self.left_line.theta+math.pi
-
+        print "sector Q", radius
         sect = SectorQ(r_min=0.0, r_max= radius , phi_min=phimin, phi_max=phimax)
         #sect = SectorQ(r_min=-1*radius , r_max= radius , phi_min=phimin, phi_max=phimax)
Index: guiframe/local_perspectives/plotting/SlicerParameters.py
===================================================================
--- guiframe/local_perspectives/plotting/SlicerParameters.py	(revision 0f6d05f8708140b1338625a6925337e321ad9ce6)
+++ guiframe/local_perspectives/plotting/SlicerParameters.py	(revision 54cc36ad4f87967b7af0579e5ddc0d69d0bf199d)
@@ -53,4 +53,5 @@
             @param event: EVT_SLICER event
         """
+        print "went here"
         event.Skip()
         if event.obj_class==None:
Index: guiframe/local_perspectives/plotting/boxSum.py
===================================================================
--- guiframe/local_perspectives/plotting/boxSum.py	(revision 2a3a890770dc75b809711bc48f24646305f01fde)
+++ guiframe/local_perspectives/plotting/boxSum.py	(revision 54cc36ad4f87967b7af0579e5ddc0d69d0bf199d)
@@ -16,5 +16,6 @@
 import SlicerParameters
 import wx
-
+#(SlicerParamUpdateEvent, EVT_SLICER_PARS_UPDATE)   = wx.lib.newevent.NewEvent()
+from sans.guicomm.events import SlicerParamUpdateEvent
 class BoxSum(_BaseInteractor):
     """
@@ -64,5 +65,5 @@
       
             
-        self.connect_markers([])
+        #self.connect_markers([])
                       
         self.update()
@@ -70,7 +71,7 @@
         
         # Bind to slice parameter events
+        print "box sum  self.base.parent",self.base.parent
         self.base.parent.Bind(SlicerParameters.EVT_SLICER_PARS, self._onEVT_SLICER_PARS)
-
-
+       
     def _onEVT_SLICER_PARS(self, event):
         #printEVT("AnnulusSlicer._onEVT_SLICER_PARS")
@@ -145,29 +146,32 @@
         # Compute data
         print 
-        """
+        
         data = self.base.data2D
         from DataLoader.manipulations import  Boxavg
         radius = math.sqrt(math.pow(self.qmax,2)+math.pow(self.qmax,2))
-        x_min= self.left_line.x 
-        x_max= self.right_line.x 
-        y_min= self.bottom_line.y
-        y_max= self.top_line.y
+        x_min= self.vertical_lines.x2 
+        x_max= self.vertical_lines.x1 
+        y_min= self.vertical_lines.y2
+        y_max= self.vertical_lines.y1
         box =  Boxavg (x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max)
         self.count, self.error = box(self.base.data2D)
         print "count, error",self.count, self.error
-        """
-                                       
+                          
     def moveend(self, ev):
         self.base.thaw_axes()
-        
         # Post paramters
+        self._post_data()
+        """
         event = SlicerParameters.SlicerParameterEvent()
         event.type = self.__class__.__name__
         print "event type boxsum: ", event.type
         event.params = self.get_params()
-        
-        wx.PostEvent(self.base.parent, event)
-      
-        self._post_data()
+        wx.PostEvent(self.base, event)
+        """
+        self.type= self.__class__.__name__
+        params= self.get_params()
+        event = SlicerParamUpdateEvent(type=self.type, params=params)
+        wx.PostEvent(self.base, event)
+        
             
     def restore(self):
@@ -224,6 +228,4 @@
                                      width=x_max,
                                      height=y_max)
-        
-        
         self.vertical_lines.update(center= self.center,
                                     width=x_max,
@@ -289,6 +291,5 @@
         self.connect_markers([self.center_marker])
         self.update()
-
-
+    
     def set_layer(self, n):
         self.layernum = n
@@ -299,4 +300,5 @@
         try:
             self.center.remove()
+            self.center_marker.remove()
         except:
             # Old version of matplotlib
@@ -451,4 +453,5 @@
         self.clear_markers()
         try:
+            self.right_marker.remove()
             self.right_line.remove()
             self.left_line.remove()
@@ -640,4 +643,5 @@
         self.clear_markers()
         try:
+            self.top_marker.remove()
             self.bottom_line.remove()
             self.top_line.remove()
Index: guiframe/local_perspectives/plotting/plotting.py
===================================================================
--- guiframe/local_perspectives/plotting/plotting.py	(revision ffd23b50a217b6b70d069bda563e2e42824e88f7)
+++ guiframe/local_perspectives/plotting/plotting.py	(revision 54cc36ad4f87967b7af0579e5ddc0d69d0bf199d)
@@ -39,6 +39,5 @@
         ## Plot panels
         self.plot_panels = []
-        
-
+       
     def populate_menu(self, id, parent):
         """
@@ -61,5 +60,7 @@
         self.parent.Bind(EVT_NEW_PLOT, self._on_plot_event)
         # We have no initial panels for this plug-in
+        
         return []
+   
     
     def get_perspective(self):
Index: guiframe/local_perspectives/plotting/slicerpanel.py
===================================================================
--- guiframe/local_perspectives/plotting/slicerpanel.py	(revision aa1b747740b44702bc3b25789ac78b0550952b72)
+++ guiframe/local_perspectives/plotting/slicerpanel.py	(revision 54cc36ad4f87967b7af0579e5ddc0d69d0bf199d)
@@ -20,18 +20,21 @@
     CENTER_PANE = False
     
-    def __init__(self, parent, *args, **kwargs):
-        wx.Panel.__init__(self, parent, *args, **kwargs)
-        self.params = {}
+    def __init__(self, parent,id=-1,type=None, params={}, *args, **kwargs):
+        wx.Panel.__init__(self, parent,id, *args, **kwargs)
+        print "panel created"
+        self.params = params
         self.parent = parent
-        self.type = None
+        self.type = type
         self.listeners = []
         self.parameters = []
         self.bck = wx.GridBagSizer(5,5)
         self.SetSizer(self.bck)
-               
-        title = wx.StaticText(self, -1, "Right-click on 2D plot for slicer options", style=wx.ALIGN_LEFT)
-        self.bck.Add(title, (0,0), (1,2), flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15)
-        
+        if type==None and params==None:      
+            title = wx.StaticText(self, -1, "Right-click on 2D plot for slicer options", style=wx.ALIGN_LEFT)
+            self.bck.Add(title, (0,0), (1,2), flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15)
+        else:
+            self.set_slicer( type, params)
         # Bindings
+        #self.parent.Bind(EVT_SLICER, self.onEVT_SLICER)
         self.parent.Bind(EVT_SLICER, self.onEVT_SLICER)
         self.parent.Bind(EVT_SLICER_PARS, self.onParamChange)
@@ -44,4 +47,5 @@
             @param event: EVT_SLICER event
         """
+        print "went here panel"
         event.Skip()
         if event.obj_class==None:
@@ -58,10 +62,10 @@
         self.bck.Clear(True)  
         self.type = type  
-        
+        print "in set slicer", type, params
         if type==None:
-            #title = wx.StaticText(self, -1, "Right-click on 2D plot for slicer options", style=wx.ALIGN_LEFT)
-            #self.bck.Add(title, (0,0), (1,2), flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15)
+            title = wx.StaticText(self, -1, "Right-click on 2D plot for slicer options", style=wx.ALIGN_LEFT)
+            self.bck.Add(title, (0,0), (1,2), flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15)
 
-        #else:
+        else:
             title = wx.StaticText(self, -1, "Slicer Parameters", style=wx.ALIGN_LEFT)
             self.bck.Add(title, (0,0), (1,2), flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15)
@@ -91,6 +95,15 @@
         self.bck.Fit(self)
         self.parent.GetSizer().Layout()
+    def onParamChange(self, evt):
+        print "parameters changed"
+        evt.Skip()
+        #if evt.type == "UPDATE":
+        for item in self.parameters:              
+            if item[0] in evt.params:
+                item[1].SetValue("%-5.3g" %evt.params[item[0]])
+                item[1].Refresh()
+        
 
-    def onParamChange(self, evt):
+    def old_onParamChange(self, evt):
         evt.Skip()
         if evt.type == "UPDATE":
