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()
-                          
+
