Index: plottools/src/danse/common/plottools/PlotPanel.py
===================================================================
--- plottools/src/danse/common/plottools/PlotPanel.py	(revision 5da3cc57a0d2568f3d27414a6c82006204b81eca)
+++ plottools/src/danse/common/plottools/PlotPanel.py	(revision f866fb50c32dcbfffa94c222dc6afe14b1730c6b)
@@ -1295,8 +1295,10 @@
 
         self.xcolor = color
+        if units.count("{") > 0 and units.count("$") < 2:
+            units = '$' + units + '$'
+        if label.count("{") > 0 and label.count("$") < 2:
+            label = '$' + label + '$'
         if units != "":
             label = label + " (" + units + ")"
-        if label.count("{") > 0 and label.count("$") < 2:
-            label = '$' + label + '$'
         if font:
             self.subplot.set_xlabel(label, fontproperties=font, color=color)
@@ -1314,9 +1316,10 @@
         """yaxis label and units."""
         self.ycolor = color
-
+        if units.count("{") > 0 and units.count("$") < 2:
+            units = '$' + units + '$'
+        if label.count("{") > 0 and label.count("$") < 2:
+            label = '$' + label + '$'
         if units != "":
             label = label + " (" + units + ")"
-        if label.count("{") > 0 and label.count("$") < 2:
-            label = '$' + label + '$'
         if font:
             self.subplot.set_ylabel(label, fontproperties=font, color=color)
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 9f51c2c49d3f518e89de3963f9add05a17bdce46)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py	(revision f866fb50c32dcbfffa94c222dc6afe14b1730c6b)
@@ -422,5 +422,6 @@
             
             id = wx.NewId()
-            self._slicerpop.Append(id, '&Copy to Clipboard', 'Copy to the clipboard')
+            self._slicerpop.Append(id, '&Copy to Clipboard', 
+                                   'Copy to the clipboard')
             wx.EVT_MENU(self, id, self.OnCopyFigureMenu)
                     
@@ -495,5 +496,5 @@
 
                 id = wx.NewId()
-                plot_menu.Append(id, '&Modify plot properties', name)
+                plot_menu.Append(id, '&Modify Plot Property', name)
                 wx.EVT_MENU(self, id, self.createAppDialog)
 
@@ -503,6 +504,6 @@
             #plot_menu.SetTitle(name)
             self._slicerpop.AppendMenu(id, '&%s'% name, plot_menu)
-                # Option to hide
-                #TODO: implement functionality to hide a plottable (legend click)
+            # Option to hide
+            #TODO: implement functionality to hide a plottable (legend click)
         if not self.graph.selected_plottable in self.plots:  
             self._slicerpop.AppendSeparator()
@@ -514,5 +515,6 @@
             
             id = wx.NewId()
-            self._slicerpop.Append(id, '&Modify graph appearance','Modify graph appearance')
+            self._slicerpop.Append(id, '&Modify Graph Appearance',
+                                   'Modify graph appearance')
             wx.EVT_MENU(self, id, self.modifyGraphAppearance)
             self._slicerpop.AppendSeparator()
@@ -550,4 +552,5 @@
     def onFreeze(self, event):
         """
+        on Freeze data
         """
         menu = event.GetEventObject()
@@ -621,7 +624,7 @@
         menu = event.GetEventObject()
         id = event.GetId()
-        self.set_selected_from_menu(menu,id)
-        self.appearance_selected_plot = self.plots[self.graph.selected_plottable]
-
+        self.set_selected_from_menu(menu, id)
+        self.appearance_selected_plot = \
+                        self.plots[self.graph.selected_plottable]
         # find current properties
         curr_color = self.appearance_selected_plot.custom_color
@@ -637,14 +640,22 @@
         icon = self.parent.GetIcon()
         self.appD.SetIcon(icon)
-        self.appD.setDefaults(float(curr_size),int(curr_color),str(appearanceDialog.find_key(self.get_symbol_label(),int(curr_symbol))),curr_label)
+        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,e):
+    def on_AppDialog_close(self, event):
+        """
+        on_Modify Plot Property_close
+        """
         if(self.appD.okay_clicked == True):
-            info = self.appD.getCurrentValues() # returns (size,color,symbol,datalabel)
-            self.appearance_selected_plot.custom_color = self._color_labels[info[1].encode('ascii','ignore')]
+            # returns (size,color,symbol,datalabel)
+            info = self.appD.get_current_values() 
+            self.appearance_selected_plot.custom_color = \
+                        self._color_labels[info[1].encode('ascii', 'ignore')]
 
             self.appearance_selected_plot.markersize = float(info[0])
-            self.appearance_selected_plot.symbol = self.get_symbol_label()[info[2]] # self._symbol_labels[info[2].encode('ascii','ignore')]
+            self.appearance_selected_plot.symbol = \
+                        self.get_symbol_label()[info[2]] 
             self.appearance_selected_plot.label = str(info[3])
 
@@ -652,5 +663,5 @@
             helpString = 'Show/Hide Graph: '
             for plot in  self.plots.itervalues():
-                helpString += (' ' + str(plot.label) +';')
+                helpString += (' ' + str(plot.label) + ';')
                 self.parent._window_menu.SetHelpString(pos, helpString)
                 self._is_changed_legend_label = True
@@ -660,15 +671,17 @@
 
 
-    def modifyGraphAppearance(self,e):
-        self.graphApp = graphAppearance(self,'Modify Graph Appearance')
+    def modifyGraphAppearance(self, event):
+        """
+        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.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.Bind(wx.EVT_CLOSE, self.on_graphApp_close)
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/appearanceDialog.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/appearanceDialog.py	(revision 9f51c2c49d3f518e89de3963f9add05a17bdce46)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/appearanceDialog.py	(revision f866fb50c32dcbfffa94c222dc6afe14b1730c6b)
@@ -1,9 +1,5 @@
 #!/usr/bin/python
-
 """
-
 Dialog for appearance of plot symbols, color, size etc.
-
-
 /**
     This software was developed by Institut Laue-Langevin as part of
@@ -13,34 +9,32 @@
 
 **/
-
-
 """
-
 import wx
 import operator
 
-
-# main appearance dialog starts here:
-
-
 class appearanceDialog(wx.Frame):
-
-    def __init__(self,parent,title):
-        super(appearanceDialog,self).__init__(parent, title=title,size=(570,450), style=wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT)
+    """
+    Appearance dialog
+    """
+    def __init__(self, parent, title):
+        """
+        Initialization of the Panel
+        """
+        super(appearanceDialog, self).__init__(parent, title=title, 
+                        size=(570,450), 
+                        style=wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT)
 
         self.okay_clicked = False
         self.parent = parent
-        self.symbolLabels = self.parent.get_symbol_label()
-        self.colorLabels = self.parent.get_color_label()
-
-
-        self.InitUI()
+        self.symbo_labels = self.parent.get_symbol_label()
+        self.color_labels = self.parent.get_color_label()
+        self.init_ui()
         self.Centre()
         self.Show()
 
-  
-    def InitUI(self):
-
-        # create spacing needed
+    def init_ui(self):
+        """
+        Create spacing needed
+        """
         panel = wx.Panel(self)
 
@@ -57,88 +51,87 @@
         ihbox2 = wx.BoxSizer(wx.HORIZONTAL)
 
-        symbolStaticBox = wx.StaticBox(panel, -1, 'Symbol')
-        symbolStaticBoxSizer = wx.StaticBoxSizer(symbolStaticBox, wx.VERTICAL)
+        symbolstaticbox = wx.StaticBox(panel, -1, 'Symbol')
+        symbolstaticboxsizer = wx.StaticBoxSizer(symbolstaticbox, wx.VERTICAL)
 
         # add widgets - reverse order!
-
         # texts
-        symbolText = wx.StaticText(panel, label='Shape')
-        colorText = wx.StaticText(panel, label='Color')
-        sizeText = wx.StaticText(panel, label='Size ')
-        labelText = wx.StaticText(panel, label='Legend label')
+        symboltext = wx.StaticText(panel, label='Shape')
+        colortext = wx.StaticText(panel, label='Color')
+        sizetext = wx.StaticText(panel, label='Size ')
+        labeltext = wx.StaticText(panel, label='Legend Label')
 
         # selection widgets
-        self.symbolListBox = wx.ListBox(panel,-1,size=(200,200))
-        self.colorListBox = wx.ComboBox(panel,style=wx.CB_READONLY, size=(195,-1))
-        self.sizeComboBox = wx.ComboBox(panel,style=wx.CB_READONLY, size=(90,-1))
-        self.sizeComboBox.Bind(wx.EVT_COMBOBOX, self.combo_click)
-        self.sizeCustomButton = wx.Button(panel, label='Custom...')
-        self.sizeCustomButton.Bind(wx.EVT_BUTTON, self.customSize)
-        self.labelTextBox = wx.TextCtrl(panel,-1, "",size=(-1,-1))
+        self.symbollistbox = wx.ListBox(panel, -1, size=(200, 200))
+        self.colorlistbox = wx.ComboBox(panel, style=wx.CB_READONLY, 
+                                        size=(185, -1))
+        self.sizecombobox = wx.ComboBox(panel, style=wx.CB_READONLY, 
+                                        size=(90, -1))
+        self.sizecombobox.Bind(wx.EVT_COMBOBOX, self.combo_click)
+        self.sizecustombutton = wx.Button(panel, label='Custom...')
+        self.sizecustombutton.Bind(wx.EVT_BUTTON, self.custom_size)
+        self.labeltextbox = wx.TextCtrl(panel, -1, "",  size=(440, -1))
 
         # buttons
-        OkButton = wx.Button(panel, label='OK')
-        OkButton.Bind(wx.EVT_BUTTON,self.onOK)
-        cancelButton = wx.Button(panel, label='Cancel')
-        cancelButton.Bind(wx.EVT_BUTTON, self.CloseDlg)
+        okbutton = wx.Button(panel, label='OK')
+        okbutton.Bind(wx.EVT_BUTTON, self.on_ok)
+        cancelbutton = wx.Button(panel, label='Cancel')
+        cancelbutton.Bind(wx.EVT_BUTTON, self.close_dlg)
 
         # now Add all the widgets to relevant spacer - tricky
-        ivbox1.Add(symbolText, flag =  wx.ALL  | wx.ALIGN_LEFT ,border=10)
-        ivbox1.Add(self.symbolListBox, flag = wx.ALL | wx.ALIGN_LEFT ,border=10)
-
-        ihbox1.Add(sizeText, flag = wx.ALL| wx.ALIGN_LEFT , border=10)
-        ihbox1.Add(self.sizeComboBox, flag =  wx.ALL|wx.RIGHT | wx.ALIGN_LEFT , border=10)
-        ihbox1.Add(self.sizeCustomButton, flag = wx.ALIGN_LEFT | wx.ALL, border=10)
-
-        ihbox2.Add(colorText,flag = wx.ALL | wx.ALIGN_LEFT, border=10)
-        ihbox2.Add(self.colorListBox, flag = wx.ALL  | wx.ALIGN_LEFT, border=10)
-
-
-
-        ivbox2.Add(ihbox1, flag =wx.ALIGN_LEFT,border=10)
-        ivbox2.Add(ihbox2, flag =wx.ALIGN_LEFT,border=10)
-
-        
-        hbox1.Add(ivbox1,flag =wx.ALIGN_LEFT ,border=10)
-        hbox1.Add(ivbox2,flag =wx.ALIGN_LEFT ,border=10)
-
-   
-        hbox2.Add(OkButton, flag = wx.ALL |  wx.ALIGN_RIGHT, border=10)
-        hbox2.Add(cancelButton, flag = wx.ALL | wx.ALIGN_RIGHT, border=10)
-
-        hbox3.Add(labelText, flag= wx.EXPAND | wx.RIGHT |  wx.ALIGN_LEFT, border=10)
-        hbox3.Add(self.labelTextBox, wx.EXPAND | wx.RIGHT |wx.ALIGN_LEFT , border=10)
+        ivbox1.Add(symboltext, flag=wx.ALL|wx.ALIGN_LEFT, border=10)
+        ivbox1.Add(self.symbollistbox, flag=wx.ALL|wx.ALIGN_LEFT, border=10)
+
+        ihbox1.Add(sizetext, flag=wx.ALL|wx.ALIGN_LEFT, border=10)
+        ihbox1.Add(self.sizecombobox, 
+                   flag= wx.ALL|wx.RIGHT|wx.ALIGN_LEFT, border=10)
+        ihbox1.Add(self.sizecustombutton, 
+                   flag=wx.ALIGN_LEFT|wx.ALL, border=10)
+
+        ihbox2.Add(colortext, flag=wx.ALL|wx.ALIGN_LEFT, border=10)
+        ihbox2.Add(self.colorlistbox, flag=wx.ALL|wx.ALIGN_LEFT, border=10)
+
+        ivbox2.Add(ihbox1, flag=wx.ALIGN_LEFT, border=10)
+        ivbox2.Add(ihbox2, flag=wx.ALIGN_LEFT, border=10)
+
+        hbox1.Add(ivbox1, flag=wx.ALIGN_LEFT, border=10)
+        hbox1.Add(ivbox2, flag=wx.ALIGN_LEFT, border=10)
+
+        hbox2.Add(okbutton, flag=wx.ALL| wx.ALIGN_RIGHT, border=10)
+        hbox2.Add(cancelbutton, flag=wx.ALL|wx.ALIGN_RIGHT, border=10)
+
+        hbox3.Add(labeltext, flag=wx.EXPAND|wx.ALL|wx.ALIGN_LEFT, border=10)
+        hbox3.Add(self.labeltextbox, flag=wx.EXPAND|wx.ALL|wx.ALIGN_LEFT, border=10)
   
-        symbolStaticBoxSizer.Add(hbox1,flag = wx.ALL | wx.EXPAND,border=10)
-        vbox.Add(symbolStaticBoxSizer, flag = wx.ALL | wx.EXPAND,border=10)
-
-        vbox.Add(hbox3,flag = wx.ALL | wx.EXPAND | wx.ALIGN_RIGHT, border=10)
-
-
-        vbox.Add(hbox2,flag = wx.ALL  | wx.ALIGN_RIGHT, border=10)
-
+        symbolstaticboxsizer.Add(hbox1, flag=wx.ALL|wx.EXPAND, border=10)
+        vbox.Add(symbolstaticboxsizer, flag=wx.ALL|wx.EXPAND, border=10)
+        vbox.Add(hbox3, flag=wx.EXPAND|wx.RIGHT, border=10)
+        vbox.Add(wx.StaticLine(panel), 0, wx.ALL|wx.EXPAND, 5)
+        vbox.Add(hbox2, flag=wx.RIGHT|wx.ALIGN_RIGHT, border=10)
 
         panel.SetSizer(vbox)
 
-        self.populateSymbol()
-        self.populateColor()
-        self.populateSize()
-
-        self.SetDefaultItem(self.symbolListBox)
-
-    def customSize(self,e):
-        dlg = wx.TextEntryDialog(self,
-                                 'Enter custom size',
-                                 'Custom size',
+        self.populate_symbol()
+        self.populate_color()
+        self.populate_size()
+
+        self.SetDefaultItem(self.symbollistbox)
+
+    def custom_size(self, event):
+        """
+        On custom size
+        """
+        dlg = wx.TextEntryDialog(self, 
+                                 'Enter custom size', 
+                                 'Custom size', 
                                  str(self.final_size))
         if(dlg.ShowModal() == wx.ID_OK):
             if(float(dlg.GetValue()) < 0):
-                dial = wx.MessageDialog(None, 
-                                        'Unfortunately imaginary icons are not yet supported. Please enter a positive value',
-                                        'Error',
-                                        wx.OK | wx.ICON_ERROR)
+                msg = "Unfortunately imaginary icons are not yet supported."
+                msg += "Please enter a positive value"
+                dial = wx.MessageDialog(None, msg, 'Error',
+                                         wx.OK|wx.ICON_ERROR)
                 dial.ShowModal()
                 dlg.Destroy()
-                self.customSize(e)
+                self.custom_size(event)
             else:
                 self.final_size = dlg.GetValue()
@@ -147,119 +140,88 @@
             dlg.Destroy()
 
-    def setDefaults(self,size,color,symbol,label):
+    def set_defaults(self, size, color, symbol, label):
+        """
+        Set Defaults
+        """
         self.final_size = size
         # set up gui values
-        self.labelTextBox.SetValue(label)
+        self.labeltextbox.SetValue(label)
         if(size % 1 == 0 and size > 1 and size < 11):
-            self.sizeComboBox.SetSelection(int(size) - 1)
+            self.sizecombobox.SetSelection(int(size) - 1)
         else:
-            self.sizeComboBox.SetSelection(4)
-        self.symbolListBox.SetSelection(self.sorted_sym_dic[symbol])
-        colorname = appearanceDialog.find_key(self.parent.get_color_label(),color)
-        self.colorListBox.SetStringSelection(colorname)
-
-    def populateSymbol(self):
-        self.sorted_symbolLabels = sorted(self.symbolLabels.iteritems(),key=operator.itemgetter(1))
+            self.sizecombobox.SetSelection(4)
+        self.symbollistbox.SetSelection(self.sorted_sym_dic[symbol])
+        colorname = appearanceDialog.find_key(self.parent.get_color_label(), 
+                                              color)
+        self.colorlistbox.SetStringSelection(colorname)
+
+    def populate_symbol(self):
+        """
+        Populate Symbols
+        """
+        self.sorted_symbo_labels = sorted(self.symbo_labels.iteritems(), 
+                                          key=operator.itemgetter(1))
         self.sorted_sym_dic = {}
         i = 0
-        for label in self.sorted_symbolLabels:
-            self.symbolListBox.Append(str(label[0]))
+        for label in self.sorted_symbo_labels:
+            self.symbollistbox.Append(str(label[0]))
             self.sorted_sym_dic[str(label[0])] = i
             i += 1
 
-    def populateColor(self):
-        sortedcolorLabels = sorted(self.colorLabels.iteritems(),key=operator.itemgetter(1))
-        
-        for color in sortedcolorLabels:
-             self.colorListBox.Append(str(color[0]))
+    def populate_color(self):
+        """
+        Populate Colors
+        """
+        sortedcolor_labels = sorted(self.color_labels.iteritems(), 
+                                   key=operator.itemgetter(1))
+        for color in sortedcolor_labels:
+            self.colorlistbox.Append(str(color[0]))
  
-    def populateSize(self):
-
-        for i in range(1,11):
-            self.sizeComboBox.Append(str(i) + '.0')
-
-    def combo_click(self,e):
-        self.final_size = self.sizeComboBox.GetValue()
-
-    def CloseDlg(self,e):
+    def populate_size(self):
+        """
+        Populate Size
+        """
+        for i in range(1, 11):
+            self.sizecombobox.Append(str(i) + '.0')
+
+    def combo_click(self, event):
+        """
+        Combox on click
+        """
+        event.Skip()
+        self.final_size = self.sizecombobox.GetValue()
+
+    def close_dlg(self, event):
+        """
+        On Close Dlg
+        """
+        event.Skip()
         self.Destroy()
 
-
-    def get_symbol_label(self):
-        """
-        Associates label to symbol
-        """
-        _labels = {}
-        i = 0
-        _labels['Circle'] = i
-        i += 1
-        _labels['Cross X '] = i
-        i += 1
-        _labels['Triangle Down'] = i
-        i += 1
-        _labels['Triangle Up'] = i
-        i += 1
-        _labels['Triangle Left'] = i
-        i += 1
-        _labels['Triangle Right'] = i
-        i += 1
-        _labels['Cross +'] = i
-        i += 1
-        _labels['Square'] = i
-        i += 1
-        _labels['Diamond'] = i
-        i += 1
-        _labels['Hexagon1'] = i
-        i += 1
-        _labels['Hexagon2'] = i
-        i += 1
-        _labels['Pentagon'] = i
-        i += 1
-        _labels['Line'] = i
-        i += 1
-        _labels['Dash'] = i
-        i += 1
-        _labels['Vline'] = i
-        i += 1
-        _labels['Step'] = i
-        return _labels
-    
-    def get_color_label(self):
-        """
-        Associates label to a specific color
-        """
-        _labels = {}
-        i = 0
-        _labels['Blue'] = i
-        i += 1
-        _labels['Green'] = i
-        i += 1
-        _labels['Red'] = i
-        i += 1
-        _labels['Cyan'] = i
-        i += 1
-        _labels['Magenta'] = i
-        i += 1
-        _labels['Yellow'] = i
-        i += 1
-        _labels['Black'] = i
-        return _labels
-
     @staticmethod
-    def find_key(dic,val):
+    def find_key(dic, val):
+        """
+        Find key
+        """
         return [k for k, v in dic.iteritems() if v == val][0]
         
-    def getCurrentValues(self): # returns (size,color,symbol,dataname)
-
+    def get_current_values(self): 
+        """
+        Get Current Values
+        :returns : (size, color, symbol, dataname)
+        """
         size = float(self.final_size)
-        name = str(self.labelTextBox.GetValue())
-        selTuple = self.symbolListBox.GetSelections()
-        symbol = appearanceDialog.find_key(self.sorted_sym_dic,int(selTuple[0]))
-        color = str(self.colorListBox.GetValue()) 
- 
-        return(size,color,symbol,name)
-
-    def onOK(self,e):
+        name = str(self.labeltextbox.GetValue())
+        seltuple = self.symbollistbox.GetSelections()
+        symbol = appearanceDialog.find_key(self.sorted_sym_dic, 
+                                           int(seltuple[0]))
+        color = str(self.colorlistbox.GetValue()) 
+        return(size, color, symbol, name)
+
+    def on_ok(self, event):
+        """
+        On OK button clicked
+        """
+        event.Skip()
         self.okay_clicked = True
-
         self.Close()
