Index: src/sas/guiframe/local_perspectives/plotting/SectorSlicer.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/SectorSlicer.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/SectorSlicer.py	(revision b40ad402cdc9c4a7e69f4ce5a13e29b50b8242fc)
@@ -1,6 +1,7 @@
-
+"""
+    Sector interactor
+"""
 import math
 import wx
-#from copy import deepcopy
 from BaseInteractor import _BaseInteractor
 from sas.guiframe.events import NewPlotEvent
@@ -16,16 +17,16 @@
     """
     def __init__(self, base, axes, color='black', zorder=3):
-        
+
         _BaseInteractor.__init__(self, base, axes, color=color)
         ## Class initialization
         self.markers = []
-        self.axes = axes   
-        ## connect the plot to event 
+        self.axes = axes
+        ## connect the plot to event
         self.connect = self.base.connect
-        
-        ## compute qmax limit to reset the graph     
-        x = math.pow(max(self.base.data2D.xmax, 
+
+        ## compute qmax limit to reset the graph
+        x = math.pow(max(self.base.data2D.xmax,
                          math.fabs(self.base.data2D.xmin)), 2)
-        y = math.pow(max(self.base.data2D.ymax, 
+        y = math.pow(max(self.base.data2D.ymax,
                          math.fabs(self.base.data2D.ymin)), 2)
         self.qmax = math.sqrt(x + y)
@@ -33,23 +34,23 @@
         self.nbins = 20
         ## Angle of the middle line
-        self.theta2 = math.pi/3
+        self.theta2 = math.pi / 3
         ## Absolute value of the Angle between the middle line and any side line
-        self.phi = math.pi/12
+        self.phi = math.pi / 12
         ## Middle line
-        self.main_line = LineInteractor(self, self.base.subplot, color='blue', 
+        self.main_line = LineInteractor(self, self.base.subplot, color='blue',
                                         zorder=zorder, r=self.qmax,
-                                           theta= self.theta2)
+                                        theta=self.theta2)
         self.main_line.qmax = self.qmax
         ## Right Side line
         self.right_line = SideInteractor(self, self.base.subplot, color='black',
-                                          zorder=zorder, r=self.qmax,
-                                          phi=-1*self.phi, theta2=self.theta2)
+                                         zorder=zorder, r=self.qmax,
+                                         phi=-1 * self.phi, theta2=self.theta2)
         self.right_line.qmax = self.qmax
-        ## Left Side line 
+        ## Left Side line
         self.left_line = SideInteractor(self, self.base.subplot, color='black',
                                         zorder=zorder, r=self.qmax,
-                                           phi=self.phi, theta2=self.theta2)
+                                        phi=self.phi, theta2=self.theta2)
         self.left_line.qmax = self.qmax
-        ## draw the sector               
+        ## draw the sector
         self.update()
         self._post_data()
@@ -60,8 +61,8 @@
         """
         receive an event containing parameters values to reset the slicer
-        
-        :param event: event of type SlicerParameterEvent with params as 
+
+        :param event: event of type SlicerParameterEvent with params as
         attribute
-        
+
         """
         wx.PostEvent(self.base.parent,
@@ -71,15 +72,15 @@
             self.set_params(event.params)
             self.base.update()
-            
+
     def set_layer(self, n):
         """
          Allow adding plot to the same panel
-         
+
         :param n: the number of layer
-        
+
         """
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -92,5 +93,5 @@
         self.base.connect.clearall()
         self.base.Unbind(EVT_SLICER_PARS)
-        
+
     def update(self):
         """
@@ -98,14 +99,14 @@
         resetting the widgets.
         """
-        # Update locations  
-        ## Check if the middle line was dragged and 
-        #update the picture accordingly     
+        # Update locations
+        ## Check if the middle line was dragged and
+        #update the picture accordingly
         if self.main_line.has_move:
             self.main_line.update()
-            self.right_line.update(delta=-self.left_line.phi/2,
-                                    mline=self.main_line.theta)
-            self.left_line.update(delta=self.left_line.phi/2,
+            self.right_line.update(delta=-self.left_line.phi / 2,
                                    mline=self.main_line.theta)
-        ## Check if the left side has moved and update the slicer accordingly  
+            self.left_line.update(delta=self.left_line.phi / 2,
+                                  mline=self.main_line.theta)
+        ## Check if the left side has moved and update the slicer accordingly
         if self.left_line.has_move:
             self.main_line.update()
@@ -113,7 +114,7 @@
                                   side=True, left=True)
             self.right_line.update(phi=self.left_line.phi, delta=None,
-                                     mline=self.main_line, side=True,
-                                     left=False, right=True)
-        ## Check if the right side line has moved and 
+                                   mline=self.main_line, side=True,
+                                   left=False, right=True)
+        ## Check if the right side line has moved and
         #update the slicer accordingly
         if self.right_line.has_move:
@@ -122,6 +123,6 @@
                                    side=True, left=False, right=True)
             self.left_line.update(phi=self.right_line.phi, delta=None,
-                                    mline=self.main_line, side=True, left=False)
-            
+                                  mline=self.main_line, side=True, left=False)
+
     def save(self, ev):
         """
@@ -137,5 +138,5 @@
         """
         compute sector averaging of data2D into data1D
-        
+
         :param nbins: the number of point to plot for the average 1D data
         """
@@ -147,16 +148,16 @@
         ## Averaging
         from sas.dataloader.manipulations import SectorQ
-        radius = self.qmax 
-        phimin =  -self.left_line.phi + self.main_line.theta
+        radius = self.qmax
+        phimin = -self.left_line.phi + self.main_line.theta
         phimax = self.left_line.phi + self.main_line.theta
         if nbins == None:
             nbins = 20
         sect = SectorQ(r_min=0.0, r_max=radius,
-                        phi_min=phimin + math.pi,
-                        phi_max=phimax + math.pi, nbins=nbins)
-     
+                       phi_min=phimin + math.pi,
+                       phi_max=phimax + math.pi, nbins=nbins)
+
         sector = sect(self.base.data2D)
         ##Create 1D data resulting from average
-       
+
         if hasattr(sector, "dxl"):
             dxl = sector.dxl
@@ -186,12 +187,11 @@
         new_plot.id = "SectorQ" + self.base.data2D.name
         new_plot.is_data = True
-        self.base.parent.update_theory(data_id=data.id, \
-                                       theory=new_plot)
-        wx.PostEvent(self.base.parent, NewPlotEvent(plot=new_plot,
-                                    title="SectorQ" + self.base.data2D.name))
-        
+        self.base.parent.update_theory(data_id=data.id, theory=new_plot)
+        wx.PostEvent(self.base.parent,
+                     NewPlotEvent(plot=new_plot, title="SectorQ" + self.base.data2D.name))
+
     def moveend(self, ev):
         """
-        Called a dragging motion ends.Get slicer event 
+        Called a dragging motion ends.Get slicer event
         """
         self.base.thaw_axes()
@@ -202,5 +202,5 @@
         ## Send slicer paramers to plotter2D
         wx.PostEvent(self.base, event)
-        
+
     def restore(self):
         """
@@ -216,19 +216,19 @@
         """
         pass
-        
+
     def set_cursor(self, x, y):
         """
         """
         pass
-        
+
     def get_params(self):
         """
         Store a copy of values of parameters of the slicer into a dictionary.
-        
+
         :return params: the dictionary created
-        
+
         """
         params = {}
-        ## Always make sure that the left and the right line are at phi 
+        ## Always make sure that the left and the right line are at phi
         ## angle of the middle line
         if math.fabs(self.left_line.phi) != math.fabs(self.right_line.phi):
@@ -236,19 +236,19 @@
             msg += " %f, %f" % (self.left_line.phi, self.right_line.phi)
             raise ValueError, msg
-        params["Phi [deg]"] = self.main_line.theta * 180/math.pi
-        params["Delta_Phi [deg]"] = math.fabs(self.left_line.phi * 180/math.pi)
+        params["Phi [deg]"] = self.main_line.theta * 180 / math.pi
+        params["Delta_Phi [deg]"] = math.fabs(self.left_line.phi * 180 / math.pi)
         params["nbins"] = self.nbins
         return params
-    
+
     def set_params(self, params):
         """
-        Receive a dictionary and reset the slicer with values contained 
+        Receive a dictionary and reset the slicer with values contained
         in the values of the dictionary.
-        
-        :param params: a dictionary containing name of slicer parameters and 
+
+        :param params: a dictionary containing name of slicer parameters and
             values the user assigned to the slicer.
         """
-        main = params["Phi [deg]"]  * math.pi/180
-        phi = math.fabs(params["Delta_Phi [deg]"] * math.pi/180)
+        main = params["Phi [deg]"] * math.pi / 180
+        phi = math.fabs(params["Delta_Phi [deg]"] * math.pi / 180)
         self.nbins = int(params["nbins"])
         self.main_line.theta = main
@@ -257,14 +257,14 @@
         self.right_line.update(phi=phi, delta=None, mline=self.main_line,
                                side=True, right=True)
-        self.left_line.update(phi=phi, delta=None, 
+        self.left_line.update(phi=phi, delta=None,
                               mline=self.main_line, side=True)
         ## post the new corresponding data
         self._post_data(nbins=self.nbins)
-        
+
     def freeze_axes(self):
         """
         """
         self.base.freeze_axes()
-    
+
     def thaw_axes(self):
         """
@@ -277,15 +277,15 @@
         self.base.draw()
 
-        
+
 class SideInteractor(_BaseInteractor):
     """
     Draw an oblique line
-    
+
     :param phi: the phase between the middle line and one side line
     :param theta2: the angle between the middle line and x- axis
-    
+
     """
     def __init__(self, base, axes, color='black', zorder=5, r=1.0,
-                 phi=math.pi/4, theta2= math.pi/3):
+                 phi=math.pi / 4, theta2=math.pi / 3):
         """
         """
@@ -295,5 +295,5 @@
         self.axes = axes
         ## compute the value of the angle between the current line and
-        ## the x-axis  
+        ## the x-axis
         self.save_theta = theta2 + phi
         self.theta = theta2 + phi
@@ -309,28 +309,15 @@
         x2 = -1 * self.radius * math.cos(self.theta)
         y2 = -1 * self.radius * math.sin(self.theta)
-        ## defining a new marker 
-        try:
-            self.inner_marker = self.axes.plot([x1/2.5], [y1/2.5], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          pickradius=5, label="pick", 
-                                          # Prefer this to other lines
-                                          zorder=zorder, visible=True)[0]
-        except:
-            self.inner_marker = self.axes.plot([x1/2.5],[y1/2.5], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          label="pick", visible=True)[0]
-            message  = "\nTHIS PROTOTYPE NEEDS THE LATEST"
-            message += " VERSION OF MATPLOTLIB\n Get the SVN version that"
-            message += " is at least as recent as June 1, 2007"
-            owner = self.base.base.parent
-            wx.PostEvent(owner, 
-                         StatusEvent(status="sectorSlicer: %s" % message))
-        
+        ## defining a new marker
+        self.inner_marker = self.axes.plot([x1 / 2.5], [y1 / 2.5], linestyle='',
+                                           marker='s', markersize=10,
+                                           color=self.color, alpha=0.6,
+                                           pickradius=5, label="pick",
+                                           zorder=zorder, visible=True)[0]
+
         ## Defining the current line
         self.line = self.axes.plot([x1, x2], [y1, y2],
-                                      linestyle='-', marker='',
-                                      color=self.color, visible=True)[0]
+                                   linestyle='-', marker='',
+                                   color=self.color, visible=True)[0]
         ## Flag to differentiate the left line from the right line motion
         self.left_moving = False
@@ -339,15 +326,15 @@
         ## connecting markers and draw the picture
         self.connect_markers([self.inner_marker, self.line])
-       
+
     def set_layer(self, n):
         """
         Allow adding plot to the same panel
-         
+
         :param n: the number of layer
-        
+
         """
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -362,13 +349,13 @@
             for item in range(len(self.axes.lines)):
                 del self.axes.lines[0]
-    
+
     def update(self, phi=None, delta=None, mline=None,
-               side=False, left= False, right=False):
+               side=False, left=False, right=False):
         """
         Draw oblique line
-        
+
         :param phi: the phase between the middle line and the current line
         :param delta: phi/2 applied only when the mline was moved
-        
+
         """
         #print "update left or right ", self.has_move
@@ -386,6 +373,6 @@
         if side:
             self.theta = mline.theta + self.phi
-                    
-        if mline != None :
+
+        if mline != None:
             if delta != 0:
                 self.theta2 = mline + delta
@@ -400,7 +387,7 @@
         x2 = -1 * self.radius * math.cos(theta3)
         y2 = -1 * self.radius * math.sin(theta3)
-        self.inner_marker.set(xdata=[x1/2.5], ydata=[y1/2.5])
-        self.line.set(xdata=[x1, x2], ydata=[y1, y2])  
-        
+        self.inner_marker.set(xdata=[x1 / 2.5], ydata=[y1 / 2.5])
+        self.line.set(xdata=[x1, x2], ydata=[y1, y2])
+
     def save(self, ev):
         """
@@ -416,5 +403,5 @@
         self.has_move = False
         self.base.moveend(ev)
-            
+
     def restore(self):
         """
@@ -433,48 +420,42 @@
             if  self.theta2 - self.theta <= 0 and self.theta2 > 0:
                 self.restore()
-                return 
+                return
             elif self.theta2 < 0 and self.theta < 0 and \
-                self.theta-self.theta2 >= 0:
-                self.restore()
-                return                             
+                self.theta - self.theta2 >= 0:
+                self.restore()
+                return
             elif  self.theta2 < 0 and self.theta > 0 and \
-                (self.theta2 + 2 * math.pi - self.theta) >= math.pi/2:
-                #print "my theta", self.theta
-                self.restore()
-                return 
+                (self.theta2 + 2 * math.pi - self.theta) >= math.pi / 2:
+                self.restore()
+                return
             elif  self.theta2 < 0 and self.theta < 0 and \
-                (self.theta2 - self.theta) >= math.pi/2:
-                #print "my theta", self.theta
-                self.restore()
-                return 
-            elif self.theta2 > 0 and (self.theta2-self.theta >= math.pi/2 or \
-                (self.theta2-self.theta >= math.pi/2)):
-                #print "self theta encore"
-                self.restore()
-                return 
+                (self.theta2 - self.theta) >= math.pi / 2:
+                self.restore()
+                return
+            elif self.theta2 > 0 and (self.theta2 - self.theta >= math.pi / 2 or \
+                (self.theta2 - self.theta >= math.pi / 2)):
+                self.restore()
+                return
         else:
-            #print "left move"
-            if  self.theta < 0 and (self.theta + math.pi*2-self.theta2) <= 0:
-                self.restore()
-                return 
-            elif self.theta2 < 0 and (self.theta-self.theta2) <= 0:
-                self.restore()
-                return                             
-            elif  self.theta > 0 and self.theta-self.theta2 <= 0:
-                #print "my theta", self.theta
-                self.restore()
-                return 
-            elif self.theta-self.theta2 >= math.pi/2 or  \
-                ((self.theta + math.pi * 2 - self.theta2) >= math.pi/2 and \
+            if  self.theta < 0 and (self.theta + math.pi * 2 - self.theta2) <= 0:
+                self.restore()
+                return
+            elif self.theta2 < 0 and (self.theta - self.theta2) <= 0:
+                self.restore()
+                return
+            elif  self.theta > 0 and self.theta - self.theta2 <= 0:
+                self.restore()
+                return
+            elif self.theta - self.theta2 >= math.pi / 2 or  \
+                ((self.theta + math.pi * 2 - self.theta2) >= math.pi / 2 and \
                  self.theta < 0 and self.theta2 > 0):
-                #print "self theta encore"
-                self.restore()
-                return 
-            
+                self.restore()
+                return
+
         self.phi = math.fabs(self.theta2 - self.theta)
         if self.phi > math.pi:
             self.phi = 2 * math.pi - math.fabs(self.theta2 - self.theta)
         self.base.base.update()
-        
+
     def set_cursor(self, x, y):
         """
@@ -482,5 +463,5 @@
         self.move(x, y, None)
         self.update()
-    
+
     def get_params(self):
         """
@@ -490,11 +471,11 @@
         params["theta"] = self.theta
         return params
-    
+
     def set_params(self, params):
         """
         """
-        x = params["radius"] 
+        x = params["radius"]
         self.set_cursor(x, None)
-        
+
 
 class LineInteractor(_BaseInteractor):
@@ -503,13 +484,13 @@
     """
     def __init__(self, base, axes, color='black',
-                 zorder=5, r=1.0, theta=math.pi/4):
+                 zorder=5, r=1.0, theta=math.pi / 4):
         """
         """
         _BaseInteractor.__init__(self, base, axes, color=color)
-        
+
         self.markers = []
         self.axes = axes
-        self.save_theta = theta 
-        self.theta= theta
+        self.save_theta = theta
+        self.theta = theta
         self.radius = r
         self.scale = 10.0
@@ -517,27 +498,16 @@
         x1 = self.radius * math.cos(self.theta)
         y1 = self.radius * math.sin(self.theta)
-        x2 = -1*self.radius * math.cos(self.theta)
-        y2 = -1*self.radius * math.sin(self.theta)
-        try:
-            # Inner circle marker
-            self.inner_marker = self.axes.plot([x1/2.5], [y1/2.5], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          pickradius=5, label="pick", 
-                                          # Prefer this to other lines
-                                          zorder=zorder, 
-                                          visible=True)[0]
-        except:
-            self.inner_marker = self.axes.plot([x1/2.5], [y1/2.5], linestyle='',
-                                          marker='s', markersize=10,
-                                          color=self.color, alpha=0.6,
-                                          label="pick", 
-                                          visible=True)[0]
-            message  = "\nTHIS PROTOTYPE NEEDS THE LATEST VERSION"
-            message += " OF MATPLOTLIB\n Get the SVN version that is at"
-            message += " least as recent as June 1, 2007"
+        x2 = -1 * self.radius * math.cos(self.theta)
+        y2 = -1 * self.radius * math.sin(self.theta)
+        # Inner circle marker
+        self.inner_marker = self.axes.plot([x1 / 2.5], [y1 / 2.5], linestyle='',
+                                           marker='s', markersize=10,
+                                           color=self.color, alpha=0.6,
+                                           pickradius=5, label="pick",
+                                           zorder=zorder,
+                                           visible=True)[0]
         self.line = self.axes.plot([x1, x2], [y1, y2],
-                                      linestyle='-', marker='',
-                                      color=self.color, visible=True)[0]
+                                   linestyle='-', marker='',
+                                   color=self.color, visible=True)[0]
         self.npts = 20
         self.has_move = False
@@ -550,5 +520,5 @@
         self.layernum = n
         self.update()
-        
+
     def clear(self):
         """
@@ -562,10 +532,10 @@
             for item in range(len(self.axes.lines)):
                 del self.axes.lines[0]
-  
+
     def update(self, theta=None):
         """
         Draw the new roughness on the graph.
         """
-       
+
         if theta != None:
             self.theta = theta
@@ -574,8 +544,8 @@
         x2 = -1 * self.radius * math.cos(self.theta)
         y2 = -1 * self.radius * math.sin(self.theta)
-        
-        self.inner_marker.set(xdata=[x1/2.5], ydata=[y1/2.5])
-        self.line.set(xdata=[x1, x2], ydata=[y1, y2])  
-    
+
+        self.inner_marker.set(xdata=[x1 / 2.5], ydata=[y1 / 2.5])
+        self.line.set(xdata=[x1, x2], ydata=[y1, y2])
+
     def save(self, ev):
         """
@@ -583,5 +553,5 @@
         can restore on Esc.
         """
-        self.save_theta= self.theta
+        self.save_theta = self.theta
         self.base.freeze_axes()
 
@@ -591,5 +561,5 @@
         self.has_move = False
         self.base.moveend(ev)
-            
+
     def restore(self):
         """
@@ -605,5 +575,5 @@
         self.has_move = True
         self.base.base.update()
-        
+
     def set_cursor(self, x, y):
         """
@@ -611,5 +581,5 @@
         self.move(x, y, None)
         self.update()
-        
+
     def get_params(self):
         """
@@ -619,9 +589,8 @@
         params["theta"] = self.theta
         return params
-    
+
     def set_params(self, params):
         """
         """
-        x = params["radius"] 
+        x = params["radius"]
         self.set_cursor(x, None)
-        
Index: src/sas/guiframe/local_perspectives/plotting/SimplePlot.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/SimplePlot.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/SimplePlot.py	(revision b40ad402cdc9c4a7e69f4ce5a13e29b50b8242fc)
@@ -3,16 +3,16 @@
 """
 import wx
-from sas.guiframe.local_perspectives.plotting.Plotter2D import ModelPanel2D \
-                    as PlotPanel
+from sas.guiframe.local_perspectives.plotting.Plotter2D import ModelPanel2D as PlotPanel
 from sas.plottools.toolbar import NavigationToolBar
 from sas.plottools.plottables import Graph
 from sas.guiframe.utils import PanelMenu
-
-class SimplePlotPanel(PlotPanel):   
+from sas.guiframe.events import StatusEvent
+
+class SimplePlotPanel(PlotPanel):
     """
     PlotPanel for 1d and 2d
-    """ 
+    """
     _window_caption = 'Simple Plot'
-    def __init__(self, parent, id=-1, color = None,
+    def __init__(self, parent, id=-1, color=None,
                  dpi=None, style=wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs):
         """
@@ -22,10 +22,10 @@
 
         self.SetColor(wx.WHITE)
-        
+
         self.toolbar = NavigationToolBar(parent=self, canvas=self.canvas)
         self.toolbar.Show(False)
         self.scale = parent.scale
         self.window_caption = self._window_caption
-            
+
     def draw(self):
         """
@@ -34,54 +34,54 @@
         self.canvas.set_resizing(self.resizing)
         self.canvas.draw()
-        
+
     def add_toolbar(self):
         """
         """
-        pass   
-     
+        pass
+
     def onContextMenu(self, event):
         """
         2D plot context menu
-        
+
         :param event: wx context event
-        
+
         """
         slicerpop = PanelMenu()
         slicerpop.set_plots(self.plots)
         slicerpop.set_graph(self.graph)
-             
-        id = wx.NewId()
-        slicerpop.Append(id, '&Save Image')
-        wx.EVT_MENU(self, id, self.onSaveImage)
-        
-        id = wx.NewId()
-        slicerpop.Append(id,'&Print Image', 'Print image')
-        wx.EVT_MENU(self, id, self.onPrint)
-        
-        id = wx.NewId()
-        slicerpop.Append(id,'&Print Preview', 'Print preview')
-        wx.EVT_MENU(self, id, self.onPrinterPreview)
-
-        id = wx.NewId()
-        slicerpop.Append(id, '&Copy to Clipboard', 'Copy to the clipboard')
-        wx.EVT_MENU(self, id, self.OnCopyFigureMenu)
+
+        wx_id = wx.NewId()
+        slicerpop.Append(wx_id, '&Save Image')
+        wx.EVT_MENU(self, wx_id, self.onSaveImage)
+
+        wx_id = wx.NewId()
+        slicerpop.Append(wx_id, '&Print Image', 'Print image')
+        wx.EVT_MENU(self, wx_id, self.onPrint)
+
+        wx_id = wx.NewId()
+        slicerpop.Append(wx_id, '&Print Preview', 'Print preview')
+        wx.EVT_MENU(self, wx_id, self.onPrinterPreview)
+
+        wx_id = wx.NewId()
+        slicerpop.Append(wx_id, '&Copy to Clipboard', 'Copy to the clipboard')
+        wx.EVT_MENU(self, wx_id, self.OnCopyFigureMenu)
 
         if self.dimension != 3:
             slicerpop.AppendSeparator()
-            id = wx.NewId()
-            slicerpop.Append(id, '&Toggle Grid On/Off', 'Toggle Grid On/Off')
-            wx.EVT_MENU(self, id, self.on_grid_onoff)
+            wx_id = wx.NewId()
+            slicerpop.Append(wx_id, '&Toggle Grid On/Off', 'Toggle Grid On/Off')
+            wx.EVT_MENU(self, wx_id, self.on_grid_onoff)
 
         if self.data.__class__.__name__ == 'Data1D':
             slicerpop.AppendSeparator()
-            id = wx.NewId()
-            slicerpop.Append(id, '&Change Scale')
-            wx.EVT_MENU(self, id, self._onProperties)        
+            wx_id = wx.NewId()
+            slicerpop.Append(wx_id, '&Change Scale')
+            wx.EVT_MENU(self, wx_id, self._onProperties)
         elif self.data2D.__class__.__name__ == 'Data2D':
             slicerpop.AppendSeparator()
-            id = wx.NewId()
-            slicerpop.Append(id, '&Toggle Linear/Log Scale')
-            wx.EVT_MENU(self, id, self._onToggleScale) 
-                
+            wx_id = wx.NewId()
+            slicerpop.Append(wx_id, '&Toggle Linear/Log Scale')
+            wx.EVT_MENU(self, wx_id, self._onToggleScale)
+
         try:
             pos_evt = event.GetPosition()
@@ -92,6 +92,6 @@
         self.PopupMenu(slicerpop, pos)
         if self.scale != None:
-            self.parent.scale2d = self.scale 
-    
+            self.parent.scale2d = self.scale
+
     def on_grid_onoff(self, event):
         """
@@ -99,10 +99,10 @@
         """
         switch = (not self.grid_on)
-        self.onGridOnOff(switch) 
-                
+        self.onGridOnOff(switch)
+
     def onLeftDown(self, event):
         """
         left button down and ready to drag
-        
+
         """
         # Check that the LEFT button was pressed
@@ -120,7 +120,7 @@
                     wx.PostEvent(self.parent, StatusEvent(status=self.position))
                 except:
-                    self.position = None    
-             
-    def _OnReSize(self, event):   
+                    self.position = None
+
+    def _OnReSize(self, event):
         """
         On response of the resize of a panel, set axes_visiable False
@@ -134,7 +134,7 @@
 
         # Ready for another event
-        # Do not remove this Skip. 
+        # Do not remove this Skip.
         # Otherwise it will get runtime error on wx>=2.9.
-        event.Skip() 
+        event.Skip()
         # set the resizing flag
         self.canvas.set_resizing(self.resizing)
@@ -143,5 +143,5 @@
             self.size, _ = self.GetClientSizeTuple()
         self.SetSizer(self.sizer)
-        
+
     def on_set_focus(self, event):
         """
@@ -149,5 +149,5 @@
         """
         pass
-        
+
     def on_kill_focus(self, event):
         """
@@ -155,5 +155,5 @@
         """
         pass
-    
+
     def show_plot(self, plot):
         """
@@ -182,15 +182,15 @@
         self.graph.yaxis(_yaxis, _yunit)
         self.xaxis(_xaxis, _xunit)
-        self.yaxis(_yaxis, _yunit) 
+        self.yaxis(_yaxis, _yunit)
         self.set_xscale(self.xscale)
-        self.set_yscale(self.yscale)   
-        self.graph.render(self)    
-                  
+        self.set_yscale(self.yscale)
+        self.graph.render(self)
+
 class PlotFrame(wx.Frame):
     """
     Frame for simple plot
     """
-    def __init__(self, parent, id, title, scale='log_{10}', 
-                 size=wx.Size(550, 470)): 
+    def __init__(self, parent, id, title, scale='log_{10}',
+                 size=wx.Size(550, 470)):
         """
         comment
@@ -199,5 +199,5 @@
         # Initialize the Frame object
         wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, size)
-        
+
         # Panel for 1D plot
         self.parent = parent
@@ -214,17 +214,12 @@
         """
         tsize = (13, 13)
-        save_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE_AS, wx.ART_TOOLBAR,
-                                            tsize)
-        quit_bmp = wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_TOOLBAR, 
-                                           tsize)
-        print_bmp = wx.ArtProvider.GetBitmap(wx.ART_PRINT, wx.ART_TOOLBAR, 
-                                           tsize)
-        preview_bmp = wx.ArtProvider.GetBitmap(wx.ART_REPORT_VIEW, wx.ART_TOOLBAR, 
-                                           tsize)
-        copy_bmp = wx.ArtProvider.GetBitmap(wx.ART_COPY, wx.ART_TOOLBAR, 
-                                           tsize)
+        save_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE_AS, wx.ART_TOOLBAR, tsize)
+        quit_bmp = wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_TOOLBAR, tsize)
+        print_bmp = wx.ArtProvider.GetBitmap(wx.ART_PRINT, wx.ART_TOOLBAR, tsize)
+        preview_bmp = wx.ArtProvider.GetBitmap(wx.ART_REPORT_VIEW, wx.ART_TOOLBAR, tsize)
+        copy_bmp = wx.ArtProvider.GetBitmap(wx.ART_COPY, wx.ART_TOOLBAR, tsize)
         menu_bar = wx.MenuBar()
-        
-        menu = wx.Menu()        
+
+        menu = wx.Menu()
         id = wx.NewId()
         item = wx.MenuItem(menu, id, "&Save Image")
@@ -244,5 +239,5 @@
         menu.AppendItem(item)
         wx.EVT_MENU(self, id, self.on_print_preview)
-        
+
         menu.AppendSeparator()
         id = wx.NewId()
@@ -253,5 +248,5 @@
         menu_bar.Append(menu, "&File")
         wx.EVT_MENU(self, id, self.on_close)
-        
+
         menu_edit = wx.Menu()
         id = wx.NewId()
@@ -260,5 +255,5 @@
         menu_edit.AppendItem(item)
         wx.EVT_MENU(self, id, self.on_copy_image)
-        
+
         menu_bar.Append(menu_edit, "&Edit")
         self.menu_bar = menu_bar
@@ -269,6 +264,6 @@
         un focusing
         """
-        pass    
-    
+        pass
+
     def add_plot(self, plot):
         """
@@ -278,10 +273,10 @@
         plotpanel.scale = self.scale
         plotpanel.show_plot(plot)
-        
+
     def set_schedule_full_draw(self, panel, func):
         """
         """
         self.plotpanel.resizing = False
-    
+
     def im_show(self, img):
         """
@@ -290,20 +285,20 @@
         """
         self.plotpanel.subplot.imshow(img)
-        
-    def set_schedule(self, schedule=False): 
+
+    def set_schedule(self, schedule=False):
         """
         """
         #Not implemented
-    
+
     def disable_app_menu(self, panel):
         """
         """
-        #Not implemented 
-    
-    def get_current_context_menu(self, plotpanel): 
-        """
-        """
         #Not implemented
-    
+
+    def get_current_context_menu(self, plotpanel):
+        """
+        """
+        #Not implemented
+
     def on_save_file(self, event):
         """
@@ -317,5 +312,5 @@
         """
         self.plotpanel.onPrint(event)
-    
+
     def on_print_preview(self, event):
         """
@@ -329,8 +324,8 @@
         """
         self.plotpanel.OnCopyFigureMenu(event)
-            
+
     def on_close(self, event):
         """
-        On Close 
+        On Close
         """
         try:
@@ -339,3 +334,3 @@
         except:
             self.Destroy()
-                          
+
Index: src/sas/guiframe/local_perspectives/plotting/SlicerParameters.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/SlicerParameters.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/SlicerParameters.py	(revision b40ad402cdc9c4a7e69f4ce5a13e29b50b8242fc)
@@ -12,15 +12,15 @@
 class SlicerParameterPanel(wx.Dialog):
     """
-    Panel class to show the slicer parameters 
+    Panel class to show the slicer parameters
     """
     #TODO: show units
     #TODO: order parameters properly
-    
+
     def __init__(self, parent, *args, **kwargs):
-        wx.Dialog.__init__(self, parent, *args, **kwargs)
         """
-        Dialog window that allow to edit parameters slicer 
+        Dialog window that allow to edit parameters slicer
         by entering new values
         """
+        wx.Dialog.__init__(self, parent, *args, **kwargs)
         self.params = {}
         self.parent = parent
@@ -33,5 +33,5 @@
         title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT)
         self.bck.Add(title, (0, 0), (1, 2),
-                     flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15)
+                     flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL, border=15)
         # Bindings
         self.parent.Bind(EVT_SLICER, self.onEVT_SLICER)
@@ -42,5 +42,5 @@
         Process EVT_SLICER events
         When the slicer changes, update the panel
-        
+
         :param event: EVT_SLICER event
         """
@@ -50,21 +50,21 @@
         else:
             self.set_slicer(event.type, event.params)
-        
+
     def set_slicer(self, type, params):
         """
         Rebuild the panel
         """
-        self.bck.Clear(True)  
-        self.type = type  
+        self.bck.Clear(True)
+        self.type = type
         if type == None:
             label = "Right-click on 2D plot for slicer options"
             title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT)
-            self.bck.Add(title, (0, 0), (1, 2), 
-                         flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15)
+            self.bck.Add(title, (0, 0), (1, 2),
+                         flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL, border=15)
         else:
-            title = wx.StaticText(self, -1, 
+            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)
+                         flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL, border=15)
             ix = 0
             iy = 0
@@ -77,6 +77,6 @@
                 if not item in ["count", "errors"]:
                     text = wx.StaticText(self, -1, item, style=wx.ALIGN_LEFT)
-                    self.bck.Add(text, (iy, ix), (1, 1), 
-                                 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+                    self.bck.Add(text, (iy, ix), (1, 1),
+                                 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
                     ctl = wx.TextCtrl(self, -1, size=(80, 20),
                                       style=wx.TE_PROCESS_ENTER)
@@ -88,24 +88,24 @@
                     self.Bind(wx.EVT_TEXT_ENTER, self.onTextEnter)
                     self.parameters.append([item, ctl])
-                    self.bck.Add(ctl, (iy, ix), (1, 1), 
-                                 wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+                    self.bck.Add(ctl, (iy, ix), (1, 1),
+                                 wx.EXPAND | wx.ADJUST_MINSIZE, 0)
                     ix = 3
-                    self.bck.Add((20, 20), (iy, ix), (1, 1), 
-                                 wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+                    self.bck.Add((20, 20), (iy, ix), (1, 1),
+                                 wx.EXPAND | wx.ADJUST_MINSIZE, 0)
                 else:
-                    text = wx.StaticText(self, -1, item + " : ", 
+                    text = wx.StaticText(self, -1, item + " : ",
                                          style=wx.ALIGN_LEFT)
-                    self.bck.Add(text, (iy, ix), (1, 1), 
-                                 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-                    ctl = wx.StaticText(self, -1, 
-                                    format_number(str(params[item])), 
-                                    style=wx.ALIGN_LEFT)
+                    self.bck.Add(text, (iy, ix), (1, 1),
+                                 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
+                    ctl = wx.StaticText(self, -1,
+                                        format_number(str(params[item])),
+                                        style=wx.ALIGN_LEFT)
                     ix = 1
-                    self.bck.Add(ctl, (iy, ix), (1, 1), 
-                                 wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+                    self.bck.Add(ctl, (iy, ix), (1, 1),
+                                 wx.EXPAND | wx.ADJUST_MINSIZE, 0)
             iy += 1
             ix = 1
-            self.bck.Add((20, 20), (iy, ix), (1, 1), 
-                         wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+            self.bck.Add((20, 20), (iy, ix), (1, 1),
+                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
         self.bck.Layout()
         self.bck.Fit(self)
@@ -119,13 +119,13 @@
         evt.Skip()
         if evt.type == "UPDATE":
-            for item in self.parameters:              
+            for item in self.parameters:
                 if item[0] in evt.params:
                     item[1].SetValue("%-5.3g" % evt.params[item[0]])
                     item[1].Refresh()
-        
-    def onTextEnter(self, evt): 
+
+    def onTextEnter(self, evt):
         """
         Parameters have changed
-        """ 
+        """
         params = {}
         has_error = False
@@ -133,6 +133,5 @@
             try:
                 params[item[0]] = float(item[1].GetValue())
-                item[1].SetBackgroundColour(
-                        wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW))
+                item[1].SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW))
                 item[1].Refresh()
             except:
@@ -146,3 +145,2 @@
             event = SlicerParameterEvent(type=self.type, params=params)
             wx.PostEvent(self.parent, event)
-        
Index: src/sas/guiframe/local_perspectives/plotting/slicerpanel.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/slicerpanel.py	(revision 27ab091887f192d9271d84f7bd03bf11a7793ab0)
+++ src/sas/guiframe/local_perspectives/plotting/slicerpanel.py	(revision b40ad402cdc9c4a7e69f4ce5a13e29b50b8242fc)
@@ -1,4 +1,2 @@
-
-
 import wx
 import wx.lib.newevent
@@ -13,5 +11,5 @@
 class SlicerPanel(wx.Panel, PanelBase):
     """
-    Panel class to show the slicer parameters 
+    Panel class to show the slicer parameters
     """
     #TODO: show units
@@ -22,10 +20,10 @@
     window_caption = "Slicer Panel"
     CENTER_PANE = False
-    
+
     def __init__(self, parent, id=-1, type=None, base=None,
-                params=None, *args, **kwargs):
+                 params=None, *args, **kwargs):
         wx.Panel.__init__(self, parent, id, *args, **kwargs)
         PanelBase.__init__(self)
-        ##  Initialization of the class     
+        ##  Initialization of the class
         self.base = base
         if params is None:
@@ -39,9 +37,9 @@
         self.bck = wx.GridBagSizer(5, 5)
         self.SetSizer(self.bck)
-        if type == None and params == None:  
-            label = "Right-click on 2D plot for slicer options"  
+        if type == None and params == None:
+            label = "Right-click on 2D plot for slicer options"
             title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT)
-            self.bck.Add(title, (0, 0), (1, 2), 
-                         flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15)
+            self.bck.Add(title, (0, 0), (1, 2),
+                         flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL, border=15)
         else:
             self.set_slicer(type, params)
@@ -54,31 +52,31 @@
         Process EVT_SLICER events
         When the slicer changes, update the panel
-        
+
         :param event: EVT_SLICER event
-        
+
         """
         event.Skip()
         if event.obj_class == None:
-            self.set_slicer(None, None) 
+            self.set_slicer(None, None)
         else:
             self.set_slicer(event.type, event.params)
-        
+
     def set_slicer(self, type, params):
         """
         Rebuild the panel
         """
-        self.bck.Clear(True)  
-        self.type = type  
+        self.bck.Clear(True)
+        self.type = type
         if type == None:
             label = "Right-click on 2D plot for slicer options"
             title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT)
-            self.bck.Add(title, (0, 0), (1, 2), 
-                         flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15)
+            self.bck.Add(title, (0, 0), (1, 2),
+                         flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL, border=15)
         else:
             title_text = str(type) + "Parameters"
-            title = wx.StaticText(self, -1, title_text, 
+            title = wx.StaticText(self, -1, title_text,
                                   style=wx.ALIGN_LEFT)
-            self.bck.Add(title, (0, 0), (1, 2), 
-                         flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15)
+            self.bck.Add(title, (0, 0), (1, 2),
+                         flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL, border=15)
             n = 1
             self.parameters = []
@@ -86,11 +84,10 @@
             keys.sort()
             for item in keys:
-                if not item.lower() in ["num_points", "avg", "avg_error", "sum",
-                                         "sum_error"]:
+                if not item.lower() in ["num_points", "avg", "avg_error", "sum", "sum_error"]:
                     n += 1
                     text = wx.StaticText(self, -1, item, style=wx.ALIGN_LEFT)
-                    self.bck.Add(text, (n-1, 0), 
-                            flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15)
-                    ctl = wx.TextCtrl(self, -1, size=(80, 20), 
+                    self.bck.Add(text, (n - 1, 0),
+                                 flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL, border=15)
+                    ctl = wx.TextCtrl(self, -1, size=(80, 20),
                                       style=wx.TE_PROCESS_ENTER)
                     hint_msg = "Modify the value of %s to change " % item
@@ -102,26 +99,22 @@
                     ctl.Bind(wx.EVT_KILL_FOCUS, self.onTextEnter)
                     self.parameters.append([item, ctl])
-                    self.bck.Add(ctl, (n-1, 1), flag=wx.TOP|wx.BOTTOM, border=0)
+                    self.bck.Add(ctl, (n - 1, 1), flag=wx.TOP | wx.BOTTOM, border=0)
             for item in keys:
-                if  item.lower() in ["num_points", "avg", "avg_error", "sum",
-                                      "sum_error"]:
+                if  item.lower() in ["num_points", "avg", "avg_error", "sum", "sum_error"]:
                     n += 1
-                    text = wx.StaticText(self, -1, item + ": ", 
-                                         style=wx.ALIGN_LEFT)
-                    self.bck.Add(text, (n-1, 0), 
-                                 flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 
+                    text = wx.StaticText(self, -1, item + ": ", style=wx.ALIGN_LEFT)
+                    self.bck.Add(text, (n - 1, 0), flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL,
                                  border=15)
-                    ctl = wx.StaticText(self, -1, 
+                    ctl = wx.StaticText(self, -1,
                                         str(format_number(params[item])),
                                         style=wx.ALIGN_LEFT)
                     ctl.SetToolTipString("Result %s" % item)
-                    self.bck.Add(ctl, (n-1, 1), flag=wx.TOP|wx.BOTTOM, border=0)       
+                    self.bck.Add(ctl, (n - 1, 1), flag=wx.TOP | wx.BOTTOM, border=0)
         self.bck.Layout()
-        #self.bck.Fit(self)
         self.Layout()
         psizer = self.parent.GetSizer()
         if psizer != None:
             psizer.Layout()
-        
+
     def onSetFocus(self, evt):
         """
@@ -134,17 +127,17 @@
         wx.CallAfter(widget.SetSelection, -1, -1)
         return
-    
+
     def onParamChange(self, evt):
         """
         Receive and event and reset the text field contained in self.parameters
-            
+
         """
         evt.Skip()
-        for item in self.parameters:              
+        for item in self.parameters:
             if item[0] in evt.params:
                 item[1].SetValue(format_number(evt.params[item[0]]))
                 item[1].Refresh()
-   
-    def onTextEnter(self, evt): 
+
+    def onTextEnter(self, evt):
         """
         Parameters have changed
@@ -156,6 +149,5 @@
             try:
                 params[item[0]] = float(item[1].GetValue())
-                item[1].SetBackgroundColour(
-                        wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW))
+                item[1].SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW))
                 item[1].Refresh()
             except:
@@ -163,5 +155,5 @@
                 item[1].SetBackgroundColour("pink")
                 item[1].Refresh()
-            
+
         if has_error == False:
             # Post parameter event
@@ -175,4 +167,4 @@
         """
         ID = self.uid
-        self.parent.delete_panel(ID)            
+        self.parent.delete_panel(ID)
         self.frame.Destroy()
