Index: src/sas/guiframe/local_perspectives/plotting/plotting.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/plotting.py	(revision b9dbd6b5e3f5275da6eb798e3bc7343fddcb6d50)
+++ src/sas/guiframe/local_perspectives/plotting/plotting.py	(revision c039589ad31dec3058311cae229f7aa1dc56faf8)
@@ -5,5 +5,5 @@
 #This software was developed by the University of Tennessee as part of the
 #Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
-#project funded by the US National Science Foundation. 
+#project funded by the US National Science Foundation.
 #
 #See the license text in license.txt
@@ -16,5 +16,4 @@
 from sas.guiframe.events import EVT_NEW_PLOT
 from sas.guiframe.events import EVT_PLOT_QRANGE
-from sas.guiframe.events import StatusEvent 
 from sas.guiframe.events import DeletePlotPanelEvent
 from sas.guiframe.plugin_base import PluginBase
@@ -25,6 +24,6 @@
 DEFAULT_MENU_ITEM_ID = wx.NewId()
 
-IS_WIN = True    
-if sys.platform.count("win32")==0:
+IS_WIN = True
+if sys.platform.count("win32") == 0:
     if int(str(wx.__version__).split('.')[0]) == 2:
         if int(str(wx.__version__).split('.')[1]) < 9:
@@ -36,8 +35,8 @@
     Plug-in class to be instantiated by the GUI manager
     """
-    
+
     def __init__(self, standalone=False):
         PluginBase.__init__(self, name="Plotting", standalone=standalone)
-      
+
         ## Plot panels
         self.plot_panels = {}
@@ -47,35 +46,28 @@
         self.menu = None
 
-     
+
     def set_panel_on_focus(self, panel):
         """
         """
         self._panel_on_focus = panel
-        
+
     def is_always_active(self):
         """
-        return True is this plugin is always active even if the user is 
+        return True is this plugin is always active even if the user is
         switching between perspectives
         """
         return True
-    
+
     def populate_menu(self, parent):
         """
         Create a 'Plot' menu to list the panels
         available for displaying
-        
+
         :param id: next available unique ID for wx events
         :param parent: parent window
-        
+
         """
         return []
-        """
-        self.menu = wx.Menu()
-        self.menu.Append(DEFAULT_MENU_ITEM_ID, DEFAULT_MENU_ITEM_LABEL, 
-                             "No graph available")
-        self.menu.FindItemByPosition(0).Enable(False)
-        return [(self.menu, "Show")]
-        """
-    
+
     def get_panels(self, parent):
         """
@@ -89,6 +81,6 @@
         # We have no initial panels for this plug-in
         return []
-    
-    def _on_plot_qrange(self, event= None):
+
+    def _on_plot_qrange(self, event=None):
         """
         On Qmin Qmax vertical line event
@@ -103,21 +95,21 @@
             return
         panel.on_plot_qrange(event)
-            
+
     def _on_show_panel(self, event):
         """show plug-in panel"""
         pass
-    
+
     def remove_plot(self, group_id, id):
         """
         remove plot of ID = id from a panel of group ID =group_id
         """
-        
+
         if group_id in self.plot_panels.keys():
             panel = self.plot_panels[group_id]
             panel.remove_data_by_id(id=id)
-            
+
             return True
         return False
-        
+
     def clear_panel(self):
         """
@@ -129,5 +121,5 @@
             self.hide_panel(group_id)
         self.plot_panels = {}
-    
+
     def clear_panel_by_id(self, group_id):
         """
@@ -141,5 +133,5 @@
             return True
         return False
-            
+
     def hide_panel(self, group_id):
         """
@@ -148,5 +140,5 @@
         # Not implemeted
         return False
-    
+
     def create_panel_helper(self, new_panel, data, group_id, title=None):
         """
@@ -167,22 +159,12 @@
         new_panel.uid = event_id
         # Ship the plottable to its panel
-        wx.CallAfter(new_panel.plot_data, data) 
+        wx.CallAfter(new_panel.plot_data, data)
         #new_panel.canvas.set_resizing(new_panel.resizing)
         self.plot_panels[new_panel.group_id] = new_panel
-        
-        # Set Graph menu and help string        
-        self.help_string = ' Graph: '
-        for plot in  new_panel.plots.itervalues():
-            help_string += (' ' + plot.label + ';')
-        #self.menu.AppendCheckItem(event_id, new_panel.window_caption, 
-        #                          helpString)
-        #self.menu.Check(event_id, IS_WIN)
-        #wx.EVT_MENU(self.parent, event_id, self._on_check_menu)
-
-        
+
     def create_1d_panel(self, data, group_id):
         """
         """
-        # Create a new plot panel if none was available        
+        # Create a new plot panel if none was available
         if issubclass(data.__class__, Data1D):
             from Plotter1D import ModelPanel1D
@@ -194,5 +176,5 @@
             win = MDIFrame(self.parent, None, 'None', (100, 200))
             new_panel = ModelPanel1D(win, -1, xtransform=xtransform,
-                     ytransform=ytransform, style=wx.RAISED_BORDER)
+                                     ytransform=ytransform, style=wx.RAISED_BORDER)
             win.set_panel(new_panel)
             win.Show(False)
@@ -200,8 +182,8 @@
             #win.Show(True)
             return  new_panel
-        
+
         msg = "1D Panel of group ID %s could not be created" % str(group_id)
         raise ValueError, msg
-    
+
     def create_2d_panel(self, data, group_id):
         """
@@ -213,14 +195,13 @@
             win = MDIFrame(self.parent, None, 'None', (200, 150))
             win.Show(False)
-            new_panel = ModelPanel2D(win, id = -1,
-                                data2d=data, scale = scale, 
-                                style=wx.RAISED_BORDER)
+            new_panel = ModelPanel2D(win, id=-1,
+                                     data2d=data, scale=scale,
+                                     style=wx.RAISED_BORDER)
             win.set_panel(new_panel)
             new_panel.frame = win
-            #win.Show(True)
             return new_panel
         msg = "2D Panel of group ID %s could not be created" % str(group_id)
         raise ValueError, msg
-    
+
     def update_panel(self, data, panel):
         """
@@ -228,7 +209,7 @@
         """
         # Check whether we already have a graph with the same units
-        # as the plottable we just received. 
-        _, x_unit =  data.get_xaxis()
-        _, y_unit =  data.get_yaxis()
+        # as the plottable we just received.
+        _, x_unit = data.get_xaxis()
+        _, y_unit = data.get_yaxis()
         flag_x = (panel.graph.prop["xunit"] is not None) and \
                     (panel.graph.prop["xunit"].strip() != "") and\
@@ -237,5 +218,5 @@
                     (panel.graph.prop["yunit"].strip() != "") and\
                     (y_unit != panel.graph.prop["yunit"]) and False
-        if (flag_x and flag_y):
+        if flag_x and flag_y:
             msg = "Cannot add %s" % str(data.name)
             msg += " to panel %s\n" % str(panel.window_caption)
@@ -253,9 +234,7 @@
             panel = self.plot_panels[group_id]
             uid = panel.uid
-            wx.PostEvent(self.parent, 
+            wx.PostEvent(self.parent,
                          DeletePlotPanelEvent(name=panel.window_caption,
-                                    caption=panel.window_caption))
-            #remove menu item
-            #self.delete_menu_item(panel.window_caption, panel.uid)
+                                              caption=panel.window_caption))
             del self.plot_panels[group_id]
             if uid in self.parent.plot_panels.keys():
@@ -265,5 +244,5 @@
 
         return False
-    
+
     def _on_plot_event(self, event):
         """
@@ -271,7 +250,7 @@
         Check whether we have a panel to put in on, or create
         a new one
-        
+
         :param event: EVT_NEW_PLOT event
-        
+
         """
         action_check = False
@@ -285,6 +264,5 @@
                     #remove data from panel
                     if action_string == 'remove':
-                        id = event.id
-                        return self.remove_plot(group_id, id)
+                        return self.remove_plot(group_id, event.id)
                     if action_string == 'hide':
                         return self.hide_panel(group_id)
@@ -295,18 +273,18 @@
                     if action_string == "clear":
                         return self.clear_panel_by_id(group_id)
-                    
-        if not hasattr(event, 'plot'):    
+
+        if not hasattr(event, 'plot'):
             return
         title = None
         if hasattr(event, 'title'):
-            title = 'Graph'#event.title      
+            title = 'Graph'  #event.title
         data = event.plot
-        group_id = data.group_id    
+        group_id = data.group_id
         if group_id in self.plot_panels.keys():
             if action_check:
                 # Check if the plot already exist. if it does, do nothing.
                 if data.id in self.plot_panels[group_id].plots.keys():
-                    return 
-            #update a panel graph 
+                    return
+            #update a panel graph
             panel = self.plot_panels[group_id]
             self.update_panel(data, panel)
@@ -331,7 +309,6 @@
                             p_plot.group_id = group_id
                             return
-                
+
                 new_panel = self.create_2d_panel(data, group_id)
-            self.create_panel_helper(new_panel, data, group_id, title) 
+            self.create_panel_helper(new_panel, data, group_id, title)
         return
-        frame.Show(True)
