Index: src/sas/guiframe/local_perspectives/plotting/Plotter1D.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 090e07ec682df3bf454d95d0e69d079939a51fbc)
@@ -1,11 +1,11 @@
 
 ################################################################################
-#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. 
+# 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.
 #
-#See the license text in license.txt
+# See the license text in license.txt
 #
-#copyright 2008, University of Tennessee
+# copyright 2008, University of Tennessee
 ################################################################################
 
@@ -15,7 +15,7 @@
 import math
 import numpy
-
+import logging
 from sas.plottools.PlotPanel import PlotPanel
-from sas.guiframe.events import StatusEvent 
+from sas.guiframe.events import StatusEvent
 from sas.guiframe.events import PanelOnFocusEvent
 from sas.guiframe.utils import PanelMenu
@@ -42,5 +42,5 @@
     Plot panel for use with the GUI manager
     """
-    
+
     ## Internal name for the AUI manager
     window_name = "plotpanel"
@@ -52,6 +52,6 @@
     ## Group ID
     group_id = None
-    
-    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):
         PlotPanel.__init__(self, parent, id=id, style=style, **kwargs)
@@ -64,7 +64,7 @@
         self.plots = {}
         self.frame = None
-        #context menu
+        # context menu
         self._slicerpop = None
-        
+
         self._available_data = []
         self._menu_add_ids = []
@@ -75,5 +75,5 @@
         self.is_xtick = False
         self.is_ytick = False
-      
+
         self.hide_menu = None
         ## Unique ID (from gui_manager)
@@ -81,22 +81,21 @@
         self.x_size = None
         ## Default locations
-        #self._default_save_location = os.getcwd() 
-        self.size = None  
-        self.vl_ind = 0     
-        ## Graph        
-        #self.graph = Graph()
+        # self._default_save_location = os.getcwd()
+        self.size = None
+        self.vl_ind = 0
+        ## Graph
+        # self.graph = Graph()
         self.graph.xaxis("\\rm{Q}", 'A^{-1}')
         self.graph.yaxis("\\rm{Intensity} ", "cm^{-1}")
         self.graph.render(self)
         self.cursor_id = None
-        
+
         # In resizing event
         self.resizing = False
         self.canvas.set_resizing(self.resizing)
         self.Bind(wx.EVT_SIZE, self._OnReSize)
-        self._add_more_tool()
         self.parent.SetFocus()
-        
-        
+
+
     def get_symbol_label(self):
         """
@@ -139,5 +138,5 @@
         _labels['Step'] = i
         return _labels
-    
+
     def get_color_label(self):
         """
@@ -161,19 +160,19 @@
         return _labels
 
-    
+
     def set_data(self, list=None):
         """
         """
         pass
-    
+
     def _reset(self):
         """
         Resets internal data and graph
-        """    
+        """
         self.graph.reset()
-        self.plots      = {}
+        self.plots = {}
         self.is_zoomed = False
-        
-    def _OnReSize(self, event):   
+
+    def _OnReSize(self, event):
         """
         On response of the resize of a panel, set axes_visiable False
@@ -196,5 +195,5 @@
         # Ready for another event
         # Do not remove this Skip. Otherwise it will get runtime error on wx>=2.9.
-        event.Skip() 
+        event.Skip()
         # set the resizing flag
         self.resizing = True
@@ -205,6 +204,6 @@
             self.size, _ = self.GetClientSizeTuple()
         self.SetSizer(self.sizer)
-        wx.CallAfter(self.parent.disable_app_menu,self)
-        
+        wx.CallAfter(self.parent.disable_app_menu, self)
+
     def on_plot_qrange(self, event=None):
         """
@@ -213,5 +212,5 @@
         if event == None:
             return
-        event.Skip() 
+        event.Skip()
         active_ctrl = event.active
         if active_ctrl == None:
@@ -225,7 +224,7 @@
                 self.ly = []
                 for ind_ly in range(len(colors)):
-                    self.ly.append(self.subplot.axvline(color=colors[ind_ly], 
+                    self.ly.append(self.subplot.axvline(color=colors[ind_ly],
                                                         lw=2.5, alpha=0.7))
-                    self.ly[ind_ly].set_rasterized(True)      
+                    self.ly[ind_ly].set_rasterized(True)
             try:
                 # Display x,y in the status bar if possible
@@ -235,7 +234,7 @@
                     wx.PostEvent(self.parent, StatusEvent(status=position))
             except:
-                pass
+                logging.error(sys.exc_value)
             if not event.leftdown:
-                # text event 
+                # text event
                 try:
                     is_moved = False
@@ -247,18 +246,12 @@
                             is_moved = True
                     if is_moved:
-                        self.canvas.draw() 
+                        self.canvas.draw()
                 except:
-                    pass
-                event.Skip() 
+                    logging.error(sys.exc_value)
+                event.Skip()
                 return
             self.q_ctrl = ctrl
-            try:
-                pos_x_min = float(self.q_ctrl[0].GetValue())
-            except:
-                pos_x_min = xmin
-            try:
-                pos_x_max = float(self.q_ctrl[1].GetValue())
-            except:
-                pos_x_max = xmax
+            pos_x_min = float(self.q_ctrl[0].GetValue())
+            pos_x_max = float(self.q_ctrl[1].GetValue())
             pos_x = [pos_x_min, pos_x_max]
             for ind_ly in range(len(colors)):
@@ -268,5 +261,5 @@
         else:
             self.q_ctrl = None
-    
+
     def get_data_xy_vals(self, xval):
         """
@@ -283,5 +276,5 @@
         except:
             return None
-           
+
     def _find_nearest(self, array, value):
         """
@@ -292,6 +285,6 @@
         """
         idx = (numpy.abs(array - value)).argmin()
-        return int(idx)#array.flat[idx]
-    
+        return int(idx)  # array.flat[idx]
+
     def _check_line_positions(self, pos_x=None, nop=None):
         """
@@ -316,10 +309,10 @@
                 self.q_ctrl[0].SetValue(str(pos_x))
                 self.q_ctrl[1].SetBackgroundColour('pink')
-                
+
     def _get_cusor_lines(self, event):
         """
         Revmove or switch cursor line if drawn
         :Param event: LeftClick mouse event
-        """  
+        """
         ax = event.inaxes
         if hasattr(event, "action"):
@@ -330,5 +323,5 @@
                 self.canvas.draw()
                 self.q_ctrl = None
-                return 
+                return
         if self.ly != None and event.xdata != None:
             # Selecting a new line if cursor lines are displayed already
@@ -339,6 +332,6 @@
                 self.vl_ind = 1
             else:
-                self.vl_ind = 0 
-                     
+                self.vl_ind = 0
+
     def cusor_line(self, event):
         """
@@ -347,5 +340,5 @@
         if self.q_ctrl == None:
             return
-        #release a q range vline
+        # release a q range vline
         if self.ly != None and not self.leftdown:
             for ly in self.ly:
@@ -358,5 +351,5 @@
         end_drag = event.action != 'drag' and event.xdata != None
         nop = len(self.plots)
-        pos_x, pos_y = float(event.xdata), float(event.ydata)
+        pos_x, _ = float(event.xdata), float(event.ydata)
         try:
             ly = self.ly
@@ -370,19 +363,15 @@
             vl_ind = self.vl_ind
             x_data = self.plots[self.cursor_id].x
-            y_data = self.plots[self.cursor_id].y
             xmin = x_data.min()
             xmax = x_data.max()
             indx = self._find_nearest(x_data, pos_x)
-            #pos_x = self._find_nearest(x_data, pos_x)
-            #indx = int(numpy.searchsorted(x_data, [pos_x])[0])
             # Need to hold LeftButton to drag
             if end_drag:
                 if event.button:
                     self._check_line_positions(pos_x, nop)
-                return   
+                return
             if indx >= len(x_data):
                 indx = len(x_data) - 1
             pos_x = x_data[indx]
-            pos_y = y_data[indx]
             if xmin == ly1x:
                 vl_ind = 1
@@ -399,6 +388,6 @@
             self.q_ctrl[vl_ind].SetValue(str(pos_x))
         except:
-            pass
-               
+            logging.error(sys.exc_value)
+
     def set_resizing(self, resizing=False):
         """
@@ -406,7 +395,7 @@
         """
         self.resizing = resizing
-        #self.canvas.set_resizing(resizing)
-    
-    def schedule_full_draw(self, func='append'):    
+        # self.canvas.set_resizing(resizing)
+
+    def schedule_full_draw(self, func='append'):
         """
         Put self in schedule to full redraw list
@@ -414,5 +403,4 @@
         # append/del this panel in the schedule list
         self.parent.set_schedule_full_draw(self, func)
-        
 
     def remove_data_by_id(self, id):
@@ -421,25 +409,25 @@
         """
         if id in self.plots.keys():
-            data =  self.plots[id]
+            data = self.plots[id]
             self.graph.delete(data)
             data_manager = self._manager.parent.get_data_manager()
             data_list, theory_list = data_manager.get_by_id(id_list=[id])
-            
+
             if id in data_list.keys():
                 data = data_list[id]
             if id in theory_list.keys():
                 data = theory_list[id]
-                
+
             del self.plots[id]
             self.graph.render(self)
-            self.subplot.figure.canvas.draw_idle()    
+            self.subplot.figure.canvas.draw_idle()
             if len(self.graph.plottables) == 0:
-                #onRemove: graph is empty must be the panel must be destroyed
+                # onRemove: graph is empty must be the panel must be destroyed
                 self.parent.delete_panel(self.uid)
-        
+
     def plot_data(self, data):
         """
         Data is ready to be displayed
-        
+
         :param event: data event
         """
@@ -448,5 +436,5 @@
         plot_keys = self.plots.keys()
         if data.id in plot_keys:
-            #Recover panel prop.s
+            # Recover panel prop.s
             xlo, xhi = self.subplot.get_xlim()
             ylo, yhi = self.subplot.get_ylim()
@@ -466,13 +454,13 @@
                 self._onEVT_FUNC_PROPERTY()
             except Exception, exc:
-                wx.PostEvent(self.parent, StatusEvent(status=\
-                    "Plotting Error: %s"% str(exc), info="error"))
+                wx.PostEvent(self.parent,
+                             StatusEvent(status="Plotting Error: %s" % str(exc), info="error"))
             if self.is_zoomed:
                 # Recover the x,y limits
-                self.subplot.set_xlim((xlo, xhi))     
-                self.subplot.set_ylim((ylo, yhi))  
+                self.subplot.set_xlim((xlo, xhi))
+                self.subplot.set_ylim((ylo, yhi))
         else:
             self.plots[data.id] = data
-            self.graph.add(self.plots[data.id]) 
+            self.graph.add(self.plots[data.id])
             data.zorder = len(plot_keys)
             ## Set the view scale for all plots
@@ -482,22 +470,22 @@
                     # MAC: forcing to plot 2D avg
                     self.canvas._onDrawIdle()
-            except Exception,exc:
+            except Exception, exc:
                 wx.PostEvent(self.parent, StatusEvent(status=\
-                    "Plotting Error: %s"% str(exc), info="error"))
+                    "Plotting Error: %s" % str(exc), info="error"))
             self.toolbar.update()
             self.is_zoomed = False
-            
+
     def draw_plot(self):
         """
         Draw plot
         """
-        self.draw()  
-
-    def onLeftDown(self,event): 
-        """ 
+        self.draw()
+
+    def onLeftDown(self, event):
+        """
         left button down and ready to drag
         Display the position of the mouse on the statusbar
         """
-        #self.parent.set_plot_unfocus() 
+        # self.parent.set_plot_unfocus()
         self._get_cusor_lines(event)
         ax = event.inaxes
@@ -505,18 +493,18 @@
         if ax != None:
             try:
-                pos_x = float(event.xdata)# / size_x
-                pos_y = float(event.ydata)# / size_y
-                pos_x = "%8.3g"% pos_x
-                pos_y = "%8.3g"% pos_y
+                pos_x = float(event.xdata)  # / size_x
+                pos_y = float(event.ydata)  # / size_y
+                pos_x = "%8.3g" % pos_x
+                pos_y = "%8.3g" % pos_y
                 self.position = str(pos_x), str(pos_y)
                 wx.PostEvent(self.parent, StatusEvent(status=self.position))
             except:
-                self.position = None  
+                self.position = None
         # unfocus all
-        self.parent.set_plot_unfocus()  
-        #post nd event to notify guiframe that this panel is on focus
+        self.parent.set_plot_unfocus()
+        # post nd event to notify guiframe that this panel is on focus
         wx.PostEvent(self.parent, PanelOnFocusEvent(panel=self))
 
-        
+
     def _ontoggle_hide_error(self, event):
         """
@@ -524,6 +512,6 @@
         """
         menu = event.GetEventObject()
-        id = event.GetId()
-        self.set_selected_from_menu(menu, id)
+        event_id = event.GetId()
+        self.set_selected_from_menu(menu, event_id)
         # Check zoom
         xlo, xhi = self.subplot.get_xlim()
@@ -537,58 +525,57 @@
         ## increment graph color
         self.graph.render(self)
-        self.subplot.figure.canvas.draw_idle()  
+        self.subplot.figure.canvas.draw_idle()
         if self.is_zoomed:
             # Recover the x,y limits
-            self.subplot.set_xlim((xlo, xhi))     
-            self.subplot.set_ylim((ylo, yhi)) 
-
-          
+            self.subplot.set_xlim((xlo, xhi))
+            self.subplot.set_ylim((ylo, yhi))
+
+
     def _onRemove(self, event):
         """
-        Remove a plottable from the graph and render the graph 
-        
+        Remove a plottable from the graph and render the graph
+
         :param event: Menu event
-        
+
         """
         menu = event.GetEventObject()
-        id = event.GetId()
-        self.set_selected_from_menu(menu, id)
+        event_id = event.GetId()
+        self.set_selected_from_menu(menu, event_id)
         ## Check if there is a selected graph to remove
         if self.graph.selected_plottable in self.plots.keys():
-            selected_plot = self.plots[self.graph.selected_plottable]
-            id = self.graph.selected_plottable
-            self.remove_data_by_id(id)
-            
+            graph_id = self.graph.selected_plottable
+            self.remove_data_by_id(graph_id)
+
     def onContextMenu(self, event):
         """
         1D plot context menu
-        
+
         :param event: wx context event
-        
+
         """
         self._slicerpop = PanelMenu()
         self._slicerpop.set_plots(self.plots)
-        self._slicerpop.set_graph(self.graph)   
-        if not self.graph.selected_plottable in self.plots:  
+        self._slicerpop.set_graph(self.graph)
+        if not self.graph.selected_plottable in self.plots:
             # Various plot options
-            id = wx.NewId()
-            self._slicerpop.Append(id, '&Save Image', 'Save image as PNG')
-            wx.EVT_MENU(self, id, self.onSaveImage)
-            id = wx.NewId()
-            self._slicerpop.Append(id, '&Print Image', 'Print image ')
-            wx.EVT_MENU(self, id, self.onPrint)
-            id = wx.NewId()
-            self._slicerpop.Append(id, '&Print Preview', 'Print preview')
-            wx.EVT_MENU(self, id, self.onPrinterPreview)
-            
-            id = wx.NewId()
-            self._slicerpop.Append(id, '&Copy to Clipboard', 
+            wx_id = wx.NewId()
+            self._slicerpop.Append(wx_id, '&Save Image', 'Save image as PNG')
+            wx.EVT_MENU(self, wx_id, self.onSaveImage)
+            wx_id = wx.NewId()
+            self._slicerpop.Append(wx_id, '&Print Image', 'Print image ')
+            wx.EVT_MENU(self, wx_id, self.onPrint)
+            wx_id = wx.NewId()
+            self._slicerpop.Append(wx_id, '&Print Preview', 'Print preview')
+            wx.EVT_MENU(self, wx_id, self.onPrinterPreview)
+
+            wx_id = wx.NewId()
+            self._slicerpop.Append(wx_id, '&Copy to Clipboard',
                                    'Copy to the clipboard')
-            wx.EVT_MENU(self, id, self.OnCopyFigureMenu)
-                    
+            wx.EVT_MENU(self, wx_id, self.OnCopyFigureMenu)
+
             self._slicerpop.AppendSeparator()
 
         for plot in self.plots.values():
-            #title = plot.title
+            # title = plot.title
             name = plot.name
             plot_menu = wx.Menu()
@@ -598,53 +585,50 @@
                 if plot != self.plots[self.graph.selected_plottable]:
                     continue
-                
-            id = wx.NewId()
-            plot_menu.Append(id, "&DataInfo", name)
-            wx.EVT_MENU(self, id, self. _onDataShow)
-            id = wx.NewId()
-            plot_menu.Append(id, "&Save Points as a File", name)
-            wx.EVT_MENU(self, id, self._onSave)
+
+            wx_id = wx.NewId()
+            plot_menu.Append(wx_id, "&DataInfo", name)
+            wx.EVT_MENU(self, wx_id, self. _onDataShow)
+            wx_id = wx.NewId()
+            plot_menu.Append(wx_id, "&Save Points as a File", name)
+            wx.EVT_MENU(self, wx_id, self._onSave)
             plot_menu.AppendSeparator()
-            
-            #add menu of other plugins
+
+            # add menu of other plugins
             item_list = self.parent.get_current_context_menu(self)
-              
+
             if (not item_list == None) and (not len(item_list) == 0):
                 for item in item_list:
 
                     try:
-                        id = wx.NewId()
-                        plot_menu.Append(id, item[0], name)
-                        wx.EVT_MENU(self, id, item[2])
+                        wx_id = wx.NewId()
+                        plot_menu.Append(wx_id, item[0], name)
+                        wx.EVT_MENU(self, wx_id, item[2])
                     except:
                         msg = "ModelPanel1D.onContextMenu: "
                         msg += "bad menu item  %s" % sys.exc_value
                         wx.PostEvent(self.parent, StatusEvent(status=msg))
-                        pass
                 plot_menu.AppendSeparator()
-            
-            if self.parent.ClassName.count('wxDialog') == 0: 
-                id = wx.NewId()
-                plot_menu.Append(id, '&Linear Fit', name)
-                wx.EVT_MENU(self, id, self.onFitting)
+
+            if self.parent.ClassName.count('wxDialog') == 0:
+                wx_id = wx.NewId()
+                plot_menu.Append(wx_id, '&Linear Fit', name)
+                wx.EVT_MENU(self, wx_id, self.onFitting)
                 plot_menu.AppendSeparator()
-    
-                id = wx.NewId()
-                plot_menu.Append(id, "Remove", name)
-                wx.EVT_MENU(self, id, self._onRemove)
+
+                wx_id = wx.NewId()
+                plot_menu.Append(wx_id, "Remove", name)
+                wx.EVT_MENU(self, wx_id, self._onRemove)
                 if not plot.is_data:
-                    id = wx.NewId()
-                    plot_menu.Append(id, '&Freeze', name)
-                    wx.EVT_MENU(self, id, self.onFreeze)
-                plot_menu.AppendSeparator()    
-                symbol_menu = wx.Menu()
-                
+                    wx_id = wx.NewId()
+                    plot_menu.Append(wx_id, '&Freeze', name)
+                    wx.EVT_MENU(self, wx_id, self.onFreeze)
+                plot_menu.AppendSeparator()
+
                 if plot.is_data:
-                    id = wx.NewId()
-                    self.hide_menu = plot_menu.Append(id, 
-                                                    "Hide Error Bar", name)
-        
+                    wx_id = wx.NewId()
+                    self.hide_menu = plot_menu.Append(wx_id, "Hide Error Bar", name)
+
                     if plot.dy is not None and plot.dy != []:
-                        if plot.hide_error :
+                        if plot.hide_error:
                             self.hide_menu.SetText('Show Error Bar')
                         else:
@@ -652,55 +636,52 @@
                     else:
                         self.hide_menu.Enable(False)
-                    wx.EVT_MENU(self, id, self._ontoggle_hide_error)
-                
+                    wx.EVT_MENU(self, wx_id, self._ontoggle_hide_error)
+
                     plot_menu.AppendSeparator()
 
-                id = wx.NewId()
-                plot_menu.Append(id, '&Modify Plot Property', name)
-                wx.EVT_MENU(self, id, self.createAppDialog)
-
-
-
-            id = wx.NewId()
-            #plot_menu.SetTitle(name)
-            self._slicerpop.AppendMenu(id, '&%s'% name, plot_menu)
+                wx_id = wx.NewId()
+                plot_menu.Append(wx_id, '&Modify Plot Property', name)
+                wx.EVT_MENU(self, wx_id, self.createAppDialog)
+            wx_id = wx.NewId()
+            # plot_menu.SetTitle(name)
+            self._slicerpop.AppendMenu(wx_id, '&%s' % name, plot_menu)
             # Option to hide
-            #TODO: implement functionality to hide a plottable (legend click)
-        if not self.graph.selected_plottable in self.plots:  
+            # TODO: implement functionality to hide a plottable (legend click)
+        if not self.graph.selected_plottable in self.plots:
             self._slicerpop.AppendSeparator()
             loc_menu = wx.Menu()
             for label in self._loc_labels:
-                id = wx.NewId()
-                loc_menu.Append(id, str(label), str(label))
-                wx.EVT_MENU(self, id, self.onChangeLegendLoc)
-            
-            id = wx.NewId()
-            self._slicerpop.Append(id, '&Modify Graph Appearance',
+                wx_id = wx.NewId()
+                loc_menu.Append(wx_id, str(label), str(label))
+                wx.EVT_MENU(self, wx_id, self.onChangeLegendLoc)
+
+            wx_id = wx.NewId()
+            self._slicerpop.Append(wx_id, '&Modify Graph Appearance',
                                    'Modify graph appearance')
-            wx.EVT_MENU(self, id, self.modifyGraphAppearance)
+            wx.EVT_MENU(self, wx_id, self.modifyGraphAppearance)
             self._slicerpop.AppendSeparator()
 
-            
+
             if self.position != None:
-                id = wx.NewId()
-                self._slicerpop.Append(id, '&Add Text')
-                wx.EVT_MENU(self, id, self._on_addtext)
-                id = wx.NewId()
-                self._slicerpop.Append(id, '&Remove Text')
-                wx.EVT_MENU(self, id, self._on_removetext)
+                wx_id = wx.NewId()
+                self._slicerpop.Append(wx_id, '&Add Text')
+                wx.EVT_MENU(self, wx_id, self._on_addtext)
+                wx_id = wx.NewId()
+                self._slicerpop.Append(wx_id, '&Remove Text')
+                wx.EVT_MENU(self, wx_id, self._on_removetext)
                 self._slicerpop.AppendSeparator()
-            id = wx.NewId()
-            self._slicerpop.Append(id, '&Change Scale')
-            wx.EVT_MENU(self, id, self._onProperties)
+            wx_id = wx.NewId()
+            self._slicerpop.Append(wx_id, '&Change Scale')
+            wx.EVT_MENU(self, wx_id, self._onProperties)
             self._slicerpop.AppendSeparator()
-            id = wx.NewId()
-            self._slicerpop.Append(id, '&Reset Graph Range')
-            wx.EVT_MENU(self, id, self.onResetGraph)  
-            
-            if self.parent.ClassName.count('wxDialog') == 0:    
+            wx_id = wx.NewId()
+            self._slicerpop.Append(wx_id, '&Reset Graph Range')
+            wx.EVT_MENU(self, wx_id, self.onResetGraph)
+
+            if self.parent.ClassName.count('wxDialog') == 0:
                 self._slicerpop.AppendSeparator()
-                id = wx.NewId()
-                self._slicerpop.Append(id, '&Window Title')
-                wx.EVT_MENU(self, id, self.onChangeCaption)
+                wx_id = wx.NewId()
+                self._slicerpop.Append(wx_id, '&Window Title')
+                wx.EVT_MENU(self, wx_id, self.onChangeCaption)
         try:
             pos_evt = event.GetPosition()
@@ -710,5 +691,5 @@
             pos = (pos_x, pos_y + 5)
         self.PopupMenu(self._slicerpop, pos)
-            
+
     def onFreeze(self, event):
         """
@@ -716,20 +697,19 @@
         """
         menu = event.GetEventObject()
-        id = event.GetId()
-        self.set_selected_from_menu(menu, id)
+        wx_id = event.GetId()
+        self.set_selected_from_menu(menu, wx_id)
         plot = self.plots[self.graph.selected_plottable]
         self.parent.onfreeze([plot.id])
-        
-                       
+
     def _onSave(self, evt):
         """
         Save a data set to a text file
-        
+
         :param evt: Menu event
-        
+
         """
         menu = evt.GetEventObject()
-        id = evt.GetId()
-        self.set_selected_from_menu(menu, id)
+        event_id = evt.GetId()
+        self.set_selected_from_menu(menu, event_id)
         data = self.plots[self.graph.selected_plottable]
         default_name = data.label
@@ -740,41 +720,26 @@
             self.parent.save_data1d(data, default_name)
 
-                       
     def _onDataShow(self, evt):
         """
         Show the data set in text
-        
+
         :param evt: Menu event
-        
+
         """
         menu = evt.GetEventObject()
-        id = evt.GetId()
-        self.set_selected_from_menu(menu, id)
+        event_id = evt.GetId()
+        self.set_selected_from_menu(menu, event_id)
         data = self.plots[self.graph.selected_plottable]
         default_name = data.label
         if default_name.count('.') > 0:
             default_name = default_name.split('.')[0]
-        #default_name += "_out"
+        # default_name += "_out"
         if self.parent != None:
             self.parent.show_data1d(data, default_name)
-            
-    def _add_more_tool(self):
-        """
-        Add refresh, add/hide button in the tool bar
-        """
-        return
-        if self.parent.__class__.__name__ != 'ViewerFrame':
-            return
-        self.toolbar.AddSeparator()
-        id_hide = wx.NewId()
-        hide = wx.Bitmap(GUIFRAME_ICON.HIDE_ID_PATH, wx.BITMAP_TYPE_PNG)
-        self.toolbar.AddSimpleTool(id_hide, hide, 'Hide', 'Hide')
-        self.toolbar.Realize()
-        wx.EVT_TOOL(self, id_hide,  self._on_hide)
-        
+
     def _on_hide(self, event):
         """
         Hides the plot when button is pressed
-        """     
+        """
         if self.parent is not None:
             self.parent.hide_panel(self.uid)
@@ -786,5 +751,5 @@
         ID = self.uid
         self.parent.delete_panel(ID)
-    
+
     def createAppDialog(self, event):
         """
@@ -792,6 +757,6 @@
         """
         menu = event.GetEventObject()
-        id = event.GetId()
-        self.set_selected_from_menu(menu, id)
+        event_id = event.GetId()
+        self.set_selected_from_menu(menu, event_id)
         self.appearance_selected_plot = \
                         self.plots[self.graph.selected_plottable]
@@ -809,8 +774,8 @@
         icon = self.parent.GetIcon()
         self.appD.SetIcon(icon)
-        self.appD.set_defaults(float(curr_size), int(curr_color), 
-                    str(appearanceDialog.find_key(self.get_symbol_label(), 
-                    int(curr_symbol))), curr_label)
-        self.appD.Bind(wx.EVT_CLOSE, self.on_AppDialog_close)    
+        self.appD.set_defaults(float(curr_size), int(curr_color),
+                               str(appearanceDialog.find_key(self.get_symbol_label(),
+                                                             int(curr_symbol))), curr_label)
+        self.appD.Bind(wx.EVT_CLOSE, self.on_AppDialog_close)
 
     def on_AppDialog_close(self, event):
@@ -818,7 +783,6 @@
         on_Modify Plot Property_close
         """
-        if(self.appD.okay_clicked == True):
-            # returns (size,color,symbol,datalabel)
-            info = self.appD.get_current_values() 
+        if self.appD.okay_clicked == True:
+            info = self.appD.get_current_values()
             self.appearance_selected_plot.custom_color = \
                         self._color_labels[info[1].encode('ascii', 'ignore')]
@@ -826,5 +790,5 @@
             self.appearance_selected_plot.markersize = float(info[0])
             self.appearance_selected_plot.symbol = \
-                        self.get_symbol_label()[info[2]] 
+                        self.get_symbol_label()[info[2]]
             self.appearance_selected_plot.label = str(info[3])
         self.appD.Destroy()
@@ -833,16 +797,15 @@
     def modifyGraphAppearance(self, event):
         """
-        On Modify Graph Appearance 
+        On Modify Graph Appearance
         """
         self.graphApp = graphAppearance(self, 'Modify Graph Appearance')
         icon = self.parent.GetIcon()
         self.graphApp.SetIcon(icon)
-        self.graphApp.setDefaults(self.grid_on, self.legend_on, 
-                                  self.xaxis_label, self.yaxis_label, 
-                                  self.xaxis_unit, self.yaxis_unit, 
-                                  self.xaxis_font, self.yaxis_font, 
-                                  find_key(self.get_loc_label(), 
-                                  self.legendLoc), 
-                                  self.xcolor, self.ycolor, 
+        self.graphApp.setDefaults(self.grid_on, self.legend_on,
+                                  self.xaxis_label, self.yaxis_label,
+                                  self.xaxis_unit, self.yaxis_unit,
+                                  self.xaxis_font, self.yaxis_font,
+                                  find_key(self.get_loc_label(), self.legendLoc),
+                                  self.xcolor, self.ycolor,
                                   self.is_xtick, self.is_ytick)
         self.graphApp.Bind(wx.EVT_CLOSE, self.on_graphApp_close)
@@ -857,6 +820,6 @@
         legend_loc = graph_app.get_legend_loc()
         toggle_legend = graph_app.get_togglelegend()
-        
-        self.onGridOnOff(toggle_grid )
+
+        self.onGridOnOff(toggle_grid)
         self.ChangeLegendLoc(legend_loc)
         self.onLegend(toggle_legend)
@@ -868,6 +831,6 @@
         self.xaxis_font = graph_app.get_xfont()
         self.yaxis_font = graph_app.get_yfont()
-        self.is_xtick =  graph_app.get_xtick_check()
-        self.is_ytick =  graph_app.get_ytick_check()
+        self.is_xtick = graph_app.get_xtick_check()
+        self.is_ytick = graph_app.get_ytick_check()
         if self.is_xtick:
             self.xaxis_tick = self.xaxis_font
@@ -875,8 +838,8 @@
             self.yaxis_tick = self.yaxis_font
 
-        self.xaxis(self.xaxis_label, self.xaxis_unit, 
-                   graph_app.get_xfont(), graph_app.get_xcolor(), 
+        self.xaxis(self.xaxis_label, self.xaxis_unit,
+                   graph_app.get_xfont(), graph_app.get_xcolor(),
                    self.xaxis_tick)
-        self.yaxis(self.yaxis_label, self.yaxis_unit, 
+        self.yaxis(self.yaxis_label, self.yaxis_unit,
                    graph_app.get_yfont(), graph_app.get_ycolor(),
                    self.yaxis_tick)
Index: src/sas/guiframe/local_perspectives/plotting/profile_dialog.py
===================================================================
--- src/sas/guiframe/local_perspectives/plotting/profile_dialog.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/guiframe/local_perspectives/plotting/profile_dialog.py	(revision 090e07ec682df3bf454d95d0e69d079939a51fbc)
@@ -270,10 +270,4 @@
         pass
     
-    def _add_more_tool(self):
-        """
-        Not implemented
-        """
-        pass 
-    
     def onChangeCaption(self, event):
         """
