Index: src/sas/plottools/PlotPanel.py
===================================================================
--- src/sas/plottools/PlotPanel.py	(revision 121f72cc5a87a31405efdc1ea930467b43f2eabf)
+++ src/sas/plottools/PlotPanel.py	(revision 3477478de6317fb51d4dd0dbaf9ab2a1236faf28)
@@ -40,5 +40,5 @@
         for a in obj.get_children(): show_tree(a, d + 1)
 
-from unitConverter import UnitConvertion as convertUnit
+from convert_units import convert_unit
 
 
@@ -1790,9 +1790,9 @@
             if self.xLabel == "x^(2)":
                 item.transformX(transform.toX2, transform.errToX2)
-                xunits = convertUnit(2, xunits)
+                xunits = convert_unit(2, xunits)
                 self.graph._xaxis_transformed("%s^{2}" % xname, "%s" % xunits)
             if self.xLabel == "x^(4)":
                 item.transformX(transform.toX4, transform.errToX4)
-                xunits = convertUnit(4, xunits)
+                xunits = convert_unit(4, xunits)
                 self.graph._xaxis_transformed("%s^{4}" % xname, "%s" % xunits)
             if self.xLabel == "ln(x)":
@@ -1805,5 +1805,5 @@
             if self.xLabel == "log10(x^(4))":
                 item.transformX(transform.toX4, transform.errToX4)
-                xunits = convertUnit(4, xunits)
+                xunits = convert_unit(4, xunits)
                 self.graph._xaxis_transformed("%s^{4}" % xname, "%s" % xunits)
                 _xscale = 'log'
@@ -1820,13 +1820,13 @@
             if self.yLabel == "y^(2)":
                 item.transformY(transform.toX2, transform.errToX2)
-                yunits = convertUnit(2, yunits)
+                yunits = convert_unit(2, yunits)
                 self.graph._yaxis_transformed("%s^{2}" % yname, "%s" % yunits)
             if self.yLabel == "1/y":
                 item.transformY(transform.toOneOverX, transform.errOneOverX)
-                yunits = convertUnit(-1, yunits)
+                yunits = convert_unit(-1, yunits)
                 self.graph._yaxis_transformed("1/%s" % yname, "%s" % yunits)
             if self.yLabel == "y*x^(4)":
                 item.transformY(transform.toYX4, transform.errToYX4)
-                xunits = convertUnit(4, self.xaxis_unit)
+                xunits = convert_unit(4, self.xaxis_unit)
                 self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname, xname),
                                               "%s%s" % (yunits, xunits))
@@ -1834,5 +1834,5 @@
                 item.transformY(transform.toOneOverSqrtX,
                                 transform.errOneOverSqrtX)
-                yunits = convertUnit(-0.5, yunits)
+                yunits = convert_unit(-0.5, yunits)
                 self.graph._yaxis_transformed("1/\sqrt{%s}" % yname,
                                               "%s" % yunits)
@@ -1843,15 +1843,15 @@
             if self.yLabel == "ln(y*x^(2))":
                 item.transformY(transform.toLogYX2, transform.errToLogYX2)
-                xunits = convertUnit(2, self.xaxis_unit)
+                xunits = convert_unit(2, self.xaxis_unit)
                 self.graph._yaxis_transformed("\ln (%s \ \ %s^{2})" % (yname, xname),
                                               "%s%s" % (yunits, xunits))
             if self.yLabel == "ln(y*x^(4))":
                 item.transformY(transform.toLogYX4, transform.errToLogYX4)
-                xunits = convertUnit(4, self.xaxis_unit)
+                xunits = convert_unit(4, self.xaxis_unit)
                 self.graph._yaxis_transformed("\ln (%s \ \ %s^{4})" % (yname, xname),
                                               "%s%s" % (yunits, xunits))
             if self.yLabel == "log10(y*x^(4))":
                 item.transformY(transform.toYX4, transform.errToYX4)
-                xunits = convertUnit(4, self.xaxis_unit)
+                xunits = convert_unit(4, self.xaxis_unit)
                 _yscale = 'log'
                 self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname, xname),
@@ -1859,5 +1859,5 @@
             if self.viewModel == "Guinier lny vs x^(2)":
                 item.transformX(transform.toX2, transform.errToX2)
-                xunits = convertUnit(2, xunits)
+                xunits = convert_unit(2, xunits)
                 self.graph._xaxis_transformed("%s^{2}" % xname, "%s" % xunits)
                 item.transformY(transform.toLogX, transform.errToLogX)
@@ -1865,5 +1865,5 @@
             if self.viewModel == "Porod y*x^(4) vs x^(4)":
                 item.transformX(transform.toX4, transform.errToX4)
-                xunits = convertUnit(4, self.xaxis_unit)
+                xunits = convert_unit(4, self.xaxis_unit)
                 self.graph._xaxis_transformed("%s^{4}" % xname, "%s" % xunits)
                 item.transformY(transform.toYX4, transform.errToYX4)
Index: src/sas/plottools/PropertyDialog.py
===================================================================
--- src/sas/plottools/PropertyDialog.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/plottools/PropertyDialog.py	(revision 3477478de6317fb51d4dd0dbaf9ab2a1236faf28)
@@ -8,10 +8,7 @@
     def __init__(self, parent, id=-1, title="Select the scale of the graph"):
         wx.Dialog.__init__(self, parent, id, title)
-        """
-        for the properties window
-        """
         self.parent = parent
         vbox = wx.BoxSizer(wx.VERTICAL)
-        sizer = wx.GridBagSizer(5,5)
+        sizer = wx.GridBagSizer(5, 5)
 
         x_size = 70
@@ -28,28 +25,28 @@
         self.xvalue = wx.ComboBox(self, -1)
         x_size += self.xvalue.GetSize()[0]
-        sizer.Add(self.xvalue, (iy, ix), (1, 1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        
+        sizer.Add(self.xvalue, (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+
         ix += 2
         self.yvalue = wx.ComboBox(self, -1)
         x_size += self.yvalue.GetSize()[0]
-        sizer.Add(self.yvalue, (iy, ix), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        
+        sizer.Add(self.yvalue, (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+
         ix += 2
         self.view = wx.ComboBox(self, -1)
         x_size += self.view.GetSize()[0]
         self.view.SetMinSize((160, 30))
-        sizer.Add(self.view, (iy,ix), (1,1),
-                  wx.EXPAND|wx.RIGHT|wx.ADJUST_MINSIZE, 10)
+        sizer.Add(self.view, (iy, ix), (1, 1),
+                  wx.EXPAND | wx.RIGHT | wx.ADJUST_MINSIZE, 10)
         self.SetMinSize((x_size, 50))
-        vbox.Add(sizer, 0, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-       
-        btCancel = wx.Button(self, wx.ID_CANCEL,'Cancel')
-        btOk = wx.Button(self, wx.ID_OK, "OK")
+        vbox.Add(sizer, 0, wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+
+        cancel_button = wx.Button(self, wx.ID_CANCEL, 'Cancel')
+        ok_button = wx.Button(self, wx.ID_OK, "OK")
         sizer_button = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_button.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        sizer_button.Add(btOk, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)
-        sizer_button.Add(btCancel, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)
+        sizer_button.Add((20, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        sizer_button.Add(ok_button, 0, wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10)
+        sizer_button.Add(cancel_button, 0, wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10)
         vbox.Add(sizer_button, 0,
-                 wx.EXPAND|wx.TOP|wx.BOTTOM|wx.ADJUST_MINSIZE, 10)
+                 wx.EXPAND | wx.TOP | wx.BOTTOM | wx.ADJUST_MINSIZE, 10)
         # scale value for x
         self.xvalue.SetValue("ln(x)")
@@ -60,5 +57,5 @@
         self.xvalue.Insert("log10(x)", 4)
         self.xvalue.Insert("log10(x^(4))", 5)
-        
+
         # scale value for y
         self.yvalue.SetValue("ln(y)")
@@ -81,18 +78,18 @@
         self.view.Insert("XS Guinier ln(y*x) vs x^(2)", 3)
         self.view.Insert("Porod y*x^(4) vs x^(4)", 4)
-        self.view.Insert("Kratky y*x^(2) vs x",5)        
+        self.view.Insert("Kratky y*x^(2) vs x", 5)
         self.SetSizer(vbox)
         self.Fit()
         self.Centre()
-           
+
     def setValues(self, x, y, view):
         """
         """
-        return  self.xvalue.SetValue(x), self.yvalue.SetValue(y),\
+        return  self.xvalue.SetValue(x), self.yvalue.SetValue(y), \
                     self.view.SetValue(view)
-        
+
     def getValues(self):
         """
         """
-        return self.xvalue.GetValue(), self.yvalue.GetValue(),\
+        return self.xvalue.GetValue(), self.yvalue.GetValue(), \
                             self.view.GetValue()
Index: src/sas/plottools/SimpleFont.py
===================================================================
--- src/sas/plottools/SimpleFont.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/plottools/SimpleFont.py	(revision 3477478de6317fb51d4dd0dbaf9ab2a1236faf28)
@@ -20,7 +20,7 @@
 
 class SimpleFont(wx.Dialog):
-    def __init__(self,parent,id,title):
+    def __init__(self, parent, id, title):
 
-        wx.Dialog.__init__(self,parent,id,title,size=(440,160))
+        wx.Dialog.__init__(self, parent, id, title, size=(440, 160))
         self.parent = parent
 #        self.SetWindowVariant(variant=FONT_VARIANT)
@@ -35,63 +35,46 @@
         self.Centre()
         self.Show()
-        
+
     def InitUI(self):
-        vbox = wx.BoxSizer(wx.VERTICAL)
-        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
-        hbox2 = wx.BoxSizer(wx.HORIZONTAL)
-        hbox3 = wx.BoxSizer(wx.HORIZONTAL)
+        self.font_family = wx.ComboBox(self, pos=(80, 10), style=wx.CB_READONLY, size=(100, -1))
+        self.font_style = wx.ComboBox(self, pos=(80, 60), style=wx.CB_READONLY, size=(100, -1))
+        self.font_point = wx.ComboBox(self, pos=(300, 10), style=wx.CB_READONLY, size=(100, -1))
+        self.font_weight = wx.ComboBox(self, pos=(300, 60), style=wx.CB_READONLY, size=(100, -1))
+        self.tick_label_check = wx.CheckBox(self, -1, label='', pos=(80, 100), size=(15, -1))
+        self.tick_label_check.SetValue(False)
+        wx.Button(self, wx.ID_OK, 'OK', pos=(215, 100))
+        wx.Button(self, wx.ID_CANCEL, 'Cancel', pos=(315, 100))
 
-        gs = wx.GridSizer(2,4,-1,-1)
-
-        self.fontFamily = wx.ComboBox(self,pos=(80,10),style=wx.CB_READONLY,
-                                      size=(100,-1))
-        self.fontStyle = wx.ComboBox(self,pos=(80,60),style=wx.CB_READONLY,
-                                     size=(100,-1))
-
-        self.fontPoint = wx.ComboBox(self,pos=(300,10),style=wx.CB_READONLY,
-                                     size=(100,-1))
-        self.fontWeight = wx.ComboBox(self,pos=(300,60),
-                                      style=wx.CB_READONLY,size=(100,-1))
-        self.tick_label_check = wx.CheckBox(self, -1, label='', pos=(80, 100), 
-										size=(15, -1))
-        self.tick_label_check.SetValue(False)
-        self.okButton = wx.Button(self,wx.ID_OK,'OK',pos=(215,100))
-        self.closeButton = wx.Button(self,wx.ID_CANCEL,'Cancel',pos=(315,100))
-        
         self._set_family_list()
         self._set_style_list()
         self._set_weight_list()
         self._set_point_list()
-        
-        familyText = wx.StaticText(self, label='Family:', pos=(10,12))
-        sizeText = wx.StaticText(self, label='Size:',pos=(220,12))
-        styleText = wx.StaticText(self, label='Style:',pos=(10,62))
-        weightText = wx.StaticText(self, label='Weight:',pos=(220,62))
-        tick_label_text = wx.StaticText(self,label='Tick label?', pos=(10, 100))
+
+        wx.StaticText(self, label='Family:', pos=(10, 12))
+        wx.StaticText(self, label='Size:', pos=(220, 12))
+        wx.StaticText(self, label='Style:', pos=(10, 62))
+        wx.StaticText(self, label='Weight:', pos=(220, 62))
+        tick_label_text = wx.StaticText(self, label='Tick label?', pos=(10, 100))
         tick_label_text.SetToolTipString("Apply to tick label too.")
-		
+
     def _set_family_list(self):
         # list of font family
-        list = FAMILY
-        for idx in range(len(list)):
-            self.fontFamily.Append(list[idx],idx)
+        for idx in range(len(FAMILY)):
+            self.font_family.Append(FAMILY[idx], idx)
 
     def _set_style_list(self):
         # list of styles
-        list = STYLE
-        for idx in range(len(list)):
-            self.fontStyle.Append(list[idx],idx)
+        for idx in range(len(STYLE)):
+            self.font_style.Append(STYLE[idx], idx)
 
     def _set_weight_list(self):
-        #list of weights
-        list = WEIGHT
-        for idx in range(len(list)):
-            self.fontWeight.Append(list[idx],idx)
+        # list of weights
+        for idx in range(len(WEIGHT)):
+            self.font_weight.Append(WEIGHT[idx], idx)
 
     def _set_point_list(self):
         # list of point sizes
-        list = SIZE
-        for idx in range(len(list)):
-            self.fontPoint.Append(str(list[idx]),idx)
+        for idx in range(len(SIZE)):
+            self.font_point.Append(str(SIZE[idx]), idx)
 
     def get_ticklabel_check(self):
@@ -108,24 +91,24 @@
         self.tick_label_check.SetValue(check)
 
-    def set_default_font(self,font):
-        
+    def set_default_font(self, font):
+
         if not font:
-            self.fontFamily.SetSelection(1)
-            self.fontWeight.SetSelection(1)
-            self.fontPoint.SetSelection(3)
-            self.fontStyle.SetSelection(0)
+            self.font_family.SetSelection(1)
+            self.font_weight.SetSelection(1)
+            self.font_point.SetSelection(3)
+            self.font_style.SetSelection(0)
         else:
-        	self.fontWeight.SetStringSelection(str(font.get_weight()))
-        	self.fontPoint.SetStringSelection(str(int(font.get_size())))
-        	self.fontFamily.SetStringSelection(str(font.get_family()[0]))
-        	self.fontStyle.SetStringSelection(str(font.get_style()))
-        	
+            self.font_weight.SetStringSelection(str(font.get_weight()))
+            self.font_point.SetStringSelection(str(int(font.get_size())))
+            self.font_family.SetStringSelection(str(font.get_family()[0]))
+            self.font_style.SetStringSelection(str(font.get_style()))
+
     def get_font(self):
-        FONT = FontProperties()
-        font = FONT.copy()
-        font.set_size(str(self.fontPoint.GetValue()))
-        font.set_name(str(self.fontFamily.GetValue()))
-        font.set_slant(str(self.fontStyle.GetValue()))
-        font.set_weight(str(self.fontWeight.GetValue()))
+        font_properties = FontProperties()
+        font = font_properties.copy()
+        font.set_size(str(self.font_point.GetValue()))
+        font.set_name(str(self.font_family.GetValue()))
+        font.set_slant(str(self.font_style.GetValue()))
+        font.set_weight(str(self.font_weight.GetValue()))
 
         return font
Index: src/sas/plottools/SizeDialog.py
===================================================================
--- src/sas/plottools/SizeDialog.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/plottools/SizeDialog.py	(revision 3477478de6317fb51d4dd0dbaf9ab2a1236faf28)
@@ -11,31 +11,28 @@
         hbox = wx.BoxSizer(wx.HORIZONTAL)
         text1 = "Enter in a custom size (> 0 accepted)"
-        msg = wx.StaticText(self, -1, text1, (30,15), style=wx.ALIGN_CENTRE)
+        msg = wx.StaticText(self, -1, text1, (30, 15), style=wx.ALIGN_CENTRE)
         msg.SetLabel(text1)
-        self.myTxtCtrl = wx.TextCtrl(self, -1, '', (100, 50))
-        
-        textbox.Add(self.myTxtCtrl, flag=wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE,
-                 border=10)
+        self.text_ctrl = wx.TextCtrl(self, -1, '', (100, 50))
+
+        textbox.Add(self.text_ctrl, flag=wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, border=10)
         vbox.Add(msg, flag=wx.ALL, border=10, proportion=1)
-        vbox.Add(textbox, flag=wx.EXPAND|wx.TOP|wx.BOTTOM|wx.ADJUST_MINSIZE,
-                 border=10)
-        self.myTxtCtrl.SetValue(str(5))
-        
-        okButton = wx.Button(self, wx.ID_OK, 'OK', size=(70, 25))
-        closeButton = wx.Button(self, wx.ID_CANCEL, 'Cancel', size=(70, 25))
+        vbox.Add(textbox, flag=wx.EXPAND | wx.TOP | wx.BOTTOM | wx.ADJUST_MINSIZE, border=10)
+        self.text_ctrl.SetValue(str(5))
 
-        hbox.Add(okButton)
+        ok_button = wx.Button(self, wx.ID_OK, 'OK', size=(70, 25))
+        close_button = wx.Button(self, wx.ID_CANCEL, 'Cancel', size=(70, 25))
+
+        hbox.Add(ok_button)
         hbox.Add((20, 20))
-        hbox.Add(closeButton)
-        
+        hbox.Add(close_button)
+
         mainbox.Add(vbox, flag=wx.ALL, border=10)
-        mainbox.Add(wx.StaticLine(self), 0, wx.ALL|wx.EXPAND, 5)
-        mainbox.Add(hbox, flag=wx.CENTER,
-                    border=10)
+        mainbox.Add(wx.StaticLine(self), 0, wx.ALL | wx.EXPAND, 5)
+        mainbox.Add(hbox, flag=wx.CENTER, border=10)
         self.SetSizer(mainbox)
-    
+
     def getText(self):
         """
         Get text typed
         """
-        return self.myTxtCtrl.GetValue()
+        return self.text_ctrl.GetValue()
Index: src/sas/plottools/TextDialog.py
===================================================================
--- src/sas/plottools/TextDialog.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/plottools/TextDialog.py	(revision 3477478de6317fb51d4dd0dbaf9ab2a1236faf28)
@@ -22,5 +22,5 @@
         wx.Dialog.__init__(self, parent, id, title, size=(PNL_WIDTH, 280))
         self.parent = parent
-        #Font
+        # Font
         self.SetWindowVariant(variant=FONT_VARIANT)
         # default
@@ -31,16 +31,14 @@
         self.color = COLOR[0]
         self.tick_label = False
-        #Dialog interface
-        vbox  = wx.BoxSizer(wx.VERTICAL)
+        # Dialog interface
+        vbox = wx.BoxSizer(wx.VERTICAL)
         text_box = wx.BoxSizer(wx.HORIZONTAL)
         sizer = wx.GridBagSizer(1, 3)
         _BOX_WIDTH = 60
-        font_size = 12
-        font_description= wx.StaticBox(self, -1, 'Font',
-                                       size=(PNL_WIDTH-20, 70))
+        font_description = wx.StaticBox(self, -1, 'Font', size=(PNL_WIDTH - 20, 70))
         font_box = wx.StaticBoxSizer(font_description, wx.VERTICAL)
         family_box = wx.BoxSizer(wx.HORIZONTAL)
         style_box = wx.BoxSizer(wx.HORIZONTAL)
-        #tcA
+        # tcA
         if unit != None:
             styles = wx.TAB_TRAVERSAL
@@ -53,14 +51,13 @@
             tick_label_text = wx.StaticText(self, -1, 'Tick label')
             tick_label_text.SetToolTipString("Apply to tick label too.")
-            self.tick_label_check = wx.CheckBox(self, -1, 
-                                                '', (10, 10))
+            self.tick_label_check = wx.CheckBox(self, -1, '', (10, 10))
             self.tick_label_check.SetValue(False)
             self.tick_label_check.SetToolTipString("Apply to tick label too.")
-            wx.EVT_CHECKBOX(self, self.tick_label_check.GetId(), 
+            wx.EVT_CHECKBOX(self, self.tick_label_check.GetId(),
                             self.on_tick_label)
             enter_text = 'Enter text:'
         else:
-            styles = wx.TAB_TRAVERSAL|wx.TE_MULTILINE|wx.TE_LINEWRAP|\
-                              wx.TE_PROCESS_ENTER|wx.SUNKEN_BORDER|wx.HSCROLL
+            styles = wx.TAB_TRAVERSAL | wx.TE_MULTILINE | wx.TE_LINEWRAP | \
+                              wx.TE_PROCESS_ENTER | wx.SUNKEN_BORDER | wx.HSCROLL
             height = 60
             unit_text = None
@@ -74,49 +71,47 @@
             else:
                 enter_text += ":"
-        self.textString = wx.TextCtrl(self, -1, size=(PNL_WIDTH-30, height ),\
-                                                        style=styles)
-        self.textString.SetValue(str(label))
-        self.textString.SetToolTipString("The text that will be displayed.")
-        #font family
-        self.fontFamily = wx.ComboBox(self, -1, style=wx.CB_READONLY)
-        wx.EVT_COMBOBOX(self.fontFamily, -1, self.on_family)
-        self.fontFamily.SetMinSize((_BOX_WIDTH, -1))
+        self.text_string = wx.TextCtrl(self, -1, size=(PNL_WIDTH - 30, height), style=styles)
+        self.text_string.SetValue(str(label))
+        self.text_string.SetToolTipString("The text that will be displayed.")
+        # font family
+        self.font_family = wx.ComboBox(self, -1, style=wx.CB_READONLY)
+        wx.EVT_COMBOBOX(self.font_family, -1, self.on_family)
+        self.font_family.SetMinSize((_BOX_WIDTH, -1))
         self._set_family_list()
-        self.fontFamily.SetSelection(1)
-        self.fontFamily.SetToolTipString("Font family of the text.")
-        #font weight
-        self.fontWeight = wx.ComboBox(self, -1, style=wx.CB_READONLY)
-        wx.EVT_COMBOBOX(self.fontWeight, -1, self.on_weight)
-        self.fontWeight.SetMinSize((_BOX_WIDTH, -1))
+        self.font_family.SetSelection(1)
+        self.font_family.SetToolTipString("Font family of the text.")
+        # font weight
+        self.font_weight = wx.ComboBox(self, -1, style=wx.CB_READONLY)
+        wx.EVT_COMBOBOX(self.font_weight, -1, self.on_weight)
+        self.font_weight.SetMinSize((_BOX_WIDTH, -1))
         self._set_weight_list()
-        self.fontWeight.SetSelection(1)
-        self.fontWeight.SetToolTipString("Font weight of the text.")
-        #font family
-        self.fontSize = wx.ComboBox(self, -1, style=wx.CB_READONLY)
-        wx.EVT_COMBOBOX(self.fontSize, -1, self.on_size)
-        self.fontSize.SetMinSize((_BOX_WIDTH, -1))
+        self.font_weight.SetSelection(1)
+        self.font_weight.SetToolTipString("Font weight of the text.")
+        # font family
+        self.font_size = wx.ComboBox(self, -1, style=wx.CB_READONLY)
+        wx.EVT_COMBOBOX(self.font_size, -1, self.on_size)
+        self.font_size.SetMinSize((_BOX_WIDTH, -1))
         self._set_size_list()
-        self.fontSize.SetSelection(5)
-        self.fontSize.SetToolTipString("Font size of the text.")
-        #font style
-        self.fontStyle = wx.ComboBox(self, -1, style=wx.CB_READONLY)
-        wx.EVT_COMBOBOX(self.fontStyle, -1, self.on_style)
-        self.fontStyle.SetMinSize((_BOX_WIDTH, -1))
+        self.font_size.SetSelection(5)
+        self.font_size.SetToolTipString("Font size of the text.")
+        # font style
+        self.font_style = wx.ComboBox(self, -1, style=wx.CB_READONLY)
+        wx.EVT_COMBOBOX(self.font_style, -1, self.on_style)
+        self.font_style.SetMinSize((_BOX_WIDTH, -1))
         self._set_style_list()
-        self.fontStyle.SetSelection(0)
-        self.fontStyle.SetToolTipString("Font style of the text.")
-        #font color
-        self.fontColor = wx.ComboBox(self, -1, style=wx.CB_READONLY)
-        wx.EVT_COMBOBOX(self.fontColor, -1, self.on_color)
-        self.fontColor.SetMinSize((_BOX_WIDTH, -1))
+        self.font_style.SetSelection(0)
+        self.font_style.SetToolTipString("Font style of the text.")
+        # font color
+        self.font_color = wx.ComboBox(self, -1, style=wx.CB_READONLY)
+        wx.EVT_COMBOBOX(self.font_color, -1, self.on_color)
+        self.font_color.SetMinSize((_BOX_WIDTH, -1))
         self._set_color_list()
-        self.fontColor.SetSelection(0)
-        self.fontColor.SetToolTipString("Font color of the text.")
+        self.font_color.SetSelection(0)
+        self.font_color.SetToolTipString("Font color of the text.")
         # Buttons on the bottom
         self.static_line_1 = wx.StaticLine(self, -1)
-        self.okButton = wx.Button(self,wx.ID_OK, 'OK', size=(_BOX_WIDTH, 25))
-        self.closeButton = wx.Button(self,wx.ID_CANCEL, 'Cancel',
-                                     size=(_BOX_WIDTH, 25))
-        
+        self.ok_button = wx.Button(self, wx.ID_OK, 'OK', size=(_BOX_WIDTH, 25))
+        self.close_button = wx.Button(self, wx.ID_CANCEL, 'Cancel', size=(_BOX_WIDTH, 25))
+
         # Intro
         explanation = "Select font properties :"
@@ -125,22 +120,22 @@
         iy = 1
         sizer.Add(wx.StaticText(self, -1, explanation), (iy, ix),
-                 (1, 1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+                  (1, 1), wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
         family_box.Add(wx.StaticText(self, -1, 'Family :'), -1, 0)
-        family_box.Add(self.fontFamily, -1, 0)
-        family_box.Add((_BOX_WIDTH/2,-1))
+        family_box.Add(self.font_family, -1, 0)
+        family_box.Add((_BOX_WIDTH / 2, -1))
         family_box.Add(wx.StaticText(self, -1, 'Size :'), -1, 0)
-        family_box.Add(self.fontSize, -1, 0)
+        family_box.Add(self.font_size, -1, 0)
         if unit_box != None:
-            family_box.Add((_BOX_WIDTH/2, -1))
+            family_box.Add((_BOX_WIDTH / 2, -1))
             family_box.Add(tick_label_text, -1, 0)
             family_box.Add(self.tick_label_check, -1, 0)
         style_box.Add(wx.StaticText(self, -1, 'Style :'), -1, 0)
-        style_box.Add(self.fontStyle, -1, 0)
-        style_box.Add((_BOX_WIDTH/2,-1))
+        style_box.Add(self.font_style, -1, 0)
+        style_box.Add((_BOX_WIDTH / 2, -1))
         style_box.Add(wx.StaticText(self, -1, 'Weight :'), -1, 0)
-        style_box.Add(self.fontWeight, -1, 0)
-        style_box.Add((_BOX_WIDTH/2,-1))
+        style_box.Add(self.font_weight, -1, 0)
+        style_box.Add((_BOX_WIDTH / 2, -1))
         style_box.Add(wx.StaticText(self, -1, 'Color :'), -1, 0)
-        style_box.Add(self.fontColor, -1, 0)
+        style_box.Add(self.font_color, -1, 0)
         font_box.Add(family_box, -1, 10)
         font_box.Add(style_box, -1, 10)
@@ -148,30 +143,30 @@
         ix = 0
         sizer.Add(font_box, (iy, ix),
-                  (1, 1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+                  (1, 1), wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
         iy += 2
         ix = 0
         sizer.Add(wx.StaticText(self, -1, enter_text), (iy, ix),
-                 (1, 1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+                  (1, 1), wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
         text_box.Add((15, 10))
-        text_box.Add(self.textString)
+        text_box.Add(self.text_string)
         vbox.Add(text_box, 0, wx.EXPAND, 15)
         if unit_box != None:
             unit_box.Add(unit_text, -1, 0)
             unit_box.Add(self.unit_ctrl, -1, 0)
-            vbox.Add((5,5))
-            vbox.Add(unit_box, 0,wx.LEFT, 15)
-        
+            vbox.Add((5, 5))
+            vbox.Add(unit_box, 0, wx.LEFT, 15)
+
         vbox.Add((10, 10))
         vbox.Add(self.static_line_1, 0, wx.EXPAND, 10)
         sizer_button = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_button.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        sizer_button.Add(self.okButton, 0, 
-                         wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)
-        sizer_button.Add(self.closeButton, 0,
-                          wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)
-        vbox.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10)
+        sizer_button.Add((20, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        sizer_button.Add(self.ok_button, 0,
+                         wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10)
+        sizer_button.Add(self.close_button, 0,
+                         wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10)
+        vbox.Add(sizer_button, 0, wx.EXPAND | wx.BOTTOM | wx.TOP, 10)
         self.SetSizer(vbox)
         self.Centre()
-        
+
     def _set_family_list(self):
         """
@@ -179,8 +174,7 @@
         """
         # list of family choices
-        list = FAMILY
-        for idx in range(len(list)):
-            self.fontFamily.Append(list[idx], idx)
-                 
+        for idx in range(len(FAMILY)):
+            self.font_family.Append(FAMILY[idx], idx)
+
     def _set_size_list(self):
         """
@@ -188,8 +182,7 @@
         """
         # list of size choices
-        list = SIZE
-        for idx in range(len(list)):
-            self.fontSize.Append(str(list[idx]),idx)   
-                 
+        for idx in range(len(SIZE)):
+            self.font_size.Append(str(SIZE[idx]), idx)
+
     def _set_weight_list(self):
         """
@@ -197,8 +190,7 @@
         """
         # list of weight choices
-        list = WEIGHT
-        for idx in range(len(list)):
-            self.fontWeight.Append(list[idx], idx)
-            
+        for idx in range(len(WEIGHT)):
+            self.font_weight.Append(WEIGHT[idx], idx)
+
     def _set_style_list(self):
         """
@@ -206,8 +198,7 @@
         """
         # list of style choices
-        list = STYLE
-        for idx in range(len(list)):
-            self.fontStyle.Append(list[idx], idx)
-            
+        for idx in range(len(STYLE)):
+            self.font_style.Append(STYLE[idx], idx)
+
     def _set_color_list(self):
         """
@@ -215,8 +206,7 @@
         """
         # list of tyle choices
-        list = COLOR
-        for idx in range(len(list)):
-            self.fontColor.Append(list[idx], idx)
-            
+        for idx in range(len(COLOR)):
+            self.font_color.Append(COLOR[idx], idx)
+
     def on_tick_label(self, event):
         """
@@ -225,5 +215,5 @@
         event.Skip()
         self.tick_label = self.tick_label_check.GetValue()
-                   
+
     def on_family(self, event):
         """
@@ -231,6 +221,6 @@
         """
         event.Skip()
-        self.family = self.fontFamily.GetValue()
-                 
+        self.family = self.font_family.GetValue()
+
     def on_style(self, event):
         """
@@ -238,6 +228,6 @@
         """
         event.Skip()
-        self.style = self.fontStyle.GetValue()
-            
+        self.style = self.font_style.GetValue()
+
     def on_weight(self, event):
         """
@@ -245,6 +235,6 @@
         """
         event.Skip()
-        self.weight = self.fontWeight.GetValue()
-    
+        self.weight = self.font_weight.GetValue()
+
     def on_size(self, event):
         """
@@ -252,6 +242,6 @@
         """
         event.Skip()
-        self.size = self.fontSize.GetValue()
-    
+        self.size = self.font_size.GetValue()
+
     def on_color(self, event):
         """
@@ -259,12 +249,12 @@
         """
         event.Skip()
-        self.color = self.fontColor.GetValue()
-           
+        self.color = self.font_color.GetValue()
+
     def getText(self):
         """
         Returns text string as input by user.
         """
-        return self.textString.GetValue()
-    
+        return self.text_string.GetValue()
+
     def getUnit(self):
         """
@@ -272,17 +262,5 @@
         """
         return self.unit_ctrl.GetValue()
-        
-    def getX(self):  
-        """
-        Returns x coordinate of text box
-        """
-        return float(self.xString.GetValue())
-        
-    def getY(self):
-        """
-        Returns y coordinate of text box
-        """
-        return float(self.yString.GetValue())
-    
+
     def getFamily(self):
         """
@@ -290,5 +268,5 @@
         """
         return str(self.family)
-    
+
     def getStyle(self):
         """
@@ -302,5 +280,5 @@
         """
         return str(self.weight)
-          
+
     def getSize(self):
         """
@@ -308,5 +286,5 @@
         """
         return int(self.size)
-    
+
     def getColor(self):
         """
@@ -314,5 +292,5 @@
         """
         return str(self.color)
-    
+
     def getTickLabel(self):
         """
Index: src/sas/plottools/convert_units.py
===================================================================
--- src/sas/plottools/convert_units.py	(revision 3477478de6317fb51d4dd0dbaf9ab2a1236faf28)
+++ src/sas/plottools/convert_units.py	(revision 3477478de6317fb51d4dd0dbaf9ab2a1236faf28)
@@ -0,0 +1,78 @@
+"""
+    Convert units to strings that can be displayed
+    This is a cleaned up version of unitConverter.py
+"""
+import re
+import string
+
+def convert_unit(power, unit):
+    """
+        Convert units to strings that can be displayed
+    """
+    if power != 0:
+        if string.find(unit, "^") != -1:  # if the unit contains a powerer ^
+            toks = re.split("\^", unit)
+            if string.find(toks[0], "/") != -1 or \
+                string.find(toks[0], "-") != -1:
+                if power == 1:
+                    unit = unit
+                else:
+                    unit = "(" + unit + ")" + "^{" + str(power) + "}"
+            else:
+                if string.find(toks[1], "{") != -1:  # if found a {
+                    find_power_toks = re.split("{", toks[1])
+                    if string.find(find_power_toks[1], "}") != -1:  # found }
+                        unit_toks = re.split("}", find_power_toks[1])
+                        if string.find(unit_toks[0], ".") != -1:
+                            powerer = float(unit_toks[0]) * power
+                        elif string.find(unit_toks[0], "/") != -1:
+                            power_toks = re.split("/", unit_toks[0])
+                            powerer = power * int(power_toks[0])\
+                                            / int(power_toks[1])
+                        else:
+                            powerer = int(unit_toks[0]) * power
+
+                        if powerer == 1.0:
+                            unit = toks[0]
+                        elif powerer == 0.5:
+                            unit = toks[0] + "^{1/2}"
+                        elif powerer == -0.5:
+                            unit = toks[0] + "^{-1/2}"
+                        else:
+                            unit = toks[0] + "^{" + str(powerer) + "}"
+                else:
+                    raise ValueError, "missing } in unit expression"
+        else:  # no powerer
+            if  power != 1:
+                unit = "(" + unit + ")" + "^{" + str(power) + "}"
+    else:
+        raise ValueError, "empty unit ,enter a powerer different from zero"
+    return unit
+
+
+if __name__ == "__main__":
+    # pylint: disable=invalid-name
+    # Input   ->  new scale  ->  Output
+    unit1 = "A^{-1} "  #             x                    A^{-1}
+    unit2 = "A"  #                   x                     A
+    unit3 = "A"  #                   x^2                  A^{2}
+    unit4 = "A "  #                  1/x                  A^{-1}
+    unit5 = "A^{0.5} "  #        x^2                      A
+    unit9 = "m^{1/2}"  #         x^2               m
+
+    # If you don't recognize the pattern, give up
+    # and just put some parentheses around the unit and write the transoformation:
+
+    unit6 = "m/s"  #                x^2               (m/s)^{2}
+    unit7 = "m/s^{2}"  #         1/x                 (m/s^{2})^{-1}
+    unit8 = "m/s^{4}"  #         x^2               (m/s^{4})^{2}
+
+    print "this unit1 %s ,its powerer %s , and value %s" % (unit1, 1, convert_unit(1, unit1))
+    print "this unit2 %s ,its powerer %s , and value %s" % (unit2, 1, convert_unit(1, unit2))
+    print "this unit3 %s ,its powerer %s , and value %s" % (unit3, 2, convert_unit(2, unit3))
+    print "this unit4 %s ,its powerer %s , and value %s" % (unit4, -1, convert_unit(-1, unit4))
+    print "this unit5 %s ,its powerer %s , and value %s" % (unit5, 2, convert_unit(2, unit5))
+    print "this unit6 %s ,its powerer %s , and value %s" % (unit6, 2, convert_unit(2, unit6))
+    print "this unit7 %s ,its powerer %s , and value %s" % (unit7, -1, convert_unit(-1, unit7))
+    print "this unit8 %s ,its powerer %s , and value %s" % (unit8, 2, convert_unit(2, unit8))
+    print "this unit9 %s ,its powerer %s , and value %s" % (unit9, 2, convert_unit(2, unit9))
Index: src/sas/plottools/plottable_interactor.py
===================================================================
--- src/sas/plottools/plottable_interactor.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/plottools/plottable_interactor.py	(revision 3477478de6317fb51d4dd0dbaf9ab2a1236faf28)
@@ -2,5 +2,4 @@
     This module allows more interaction with the plot
 """
-import plottables
 from BaseInteractor import _BaseInteractor
 
@@ -26,31 +25,29 @@
         self._dragged = False
         self.connect_markers([self.axes])
-        
+
     def _color(self, c):
         """Return a particular colour"""
         return self.colorlist[c % len(self.colorlist)]
-    
+
     def _symbol(self, s):
         """Return a particular symbol"""
         return self.symbollist[s % len(self.symbollist)]
 
-    def points(self, x, y, dx=None, dy=None, color=0, symbol=0, zorder=1, 
+    def points(self, x, y, dx=None, dy=None, color=0, symbol=0, zorder=1,
                markersize=5, label=None, hide_error=False):
         """
         """
-        #Draw curve
+        # Draw curve
         if self._symbol(symbol) == '-' or self._symbol(symbol) == '--':
             l_width = markersize * 0.4
-            return self.curve(x=x, y=y, color=color, symbol=symbol, 
+            return self.curve(x=x, y=y, color=color, symbol=symbol,
                               label=label, width=l_width)
-            #return
+            # return
         if self._symbol(symbol) == 'vline':
             l_width = markersize * 0.4
-            return self.vline(x=x, y=y, color=color, 
-                                label=label, width=l_width)
+            return self.vline(x=x, y=y, color=color, label=label, width=l_width)
         if self._symbol(symbol) == 'step':
             l_width = markersize * 0.4
-            return self.step(x=x, y=y, color=color, 
-                                label=label, width=l_width)
+            return self.step(x=x, y=y, color=color, label=label, width=l_width)
         if not self.marker == None:
             self.base.connect.clear([self.marker])
@@ -60,10 +57,10 @@
         # Convert tuple (lo,hi) to array [(x-lo),(hi-x)]
         if dx != None and type(dx) == type(()):
-            dx = nx.vstack((x-dx[0], dx[1]-x)).transpose()
+            dx = nx.vstack((x - dx[0], dx[1] - x)).transpose()
         if dy != None and type(dy) == type(()):
-            dy = nx.vstack((y-dy[0], dy[1]-y)).transpose()
-        
+            dy = nx.vstack((y - dy[0], dy[1] - y)).transpose()
+
         if dx == None and dy == None:
-            #zorder = 1
+            # zorder = 1
             self.marker = self.axes.plot(x, y, color=self.color,
                                          marker=self._symbol(symbol),
@@ -72,7 +69,7 @@
                                          zorder=zorder)[0]
         else:
-            
+
             if hide_error:
-                #zorder = 1
+                # zorder = 1
                 self.marker = self.axes.plot(x, y, color=self.color,
                                              marker=self._symbol(symbol),
@@ -81,5 +78,5 @@
                                              zorder=1)[0]
             else:
-                #zorder = 2
+                # zorder = 2
                 self.marker = self.axes.errorbar(x, y, yerr=dy,
                                                  xerr=None,
@@ -95,9 +92,9 @@
                                                  label=label,
                                                  zorder=1)[0]
-            
-        self.connect_markers([self.marker])
-        self.update()
-        
-    def curve(self, x, y, dy=None, color=0, symbol=0, zorder=10, 
+
+        self.connect_markers([self.marker])
+        self.update()
+
+    def curve(self, x, y, dy=None, color=0, symbol=0, zorder=10,
               label=None, width=2.0):
         """
@@ -109,10 +106,10 @@
                                      marker='', linestyle=self._symbol(symbol),
                                      label=label, zorder=zorder)[0]
-            
-        self.connect_markers([self.marker])
-        self.update()
-
-        
-    def vline(self, x, y, dy=None, color=0, symbol=0, zorder=1, 
+
+        self.connect_markers([self.marker])
+        self.update()
+
+
+    def vline(self, x, y, dy=None, color=0, symbol=0, zorder=1,
               label=None, width=2.0):
         """
@@ -124,29 +121,26 @@
             y_min = 0.0
         else:
-            y_min = min(y)*9/10
-        self.marker = self.axes.vlines(x=x, ymin=y_min, ymax=y, 
-                                      color=self.color, 
-                                      linestyle='-', label=label,
-                                      lw=width, zorder=zorder)    
+            y_min = min(y) * 9 / 10
+        self.marker = self.axes.vlines(x=x, ymin=y_min, ymax=y,
+                                       color=self.color,
+                                       linestyle='-', label=label,
+                                       lw=width, zorder=zorder)
         self.connect_markers([self.marker])
         self.update()
 
     def step(self, x, y, dy=None, color=0, symbol=0, zorder=1,
-              label=None, width=2.0):
-        """
-        """
-        if not self.marker == None:
-            self.base.connect.clear([self.marker])
-        self.color = self._color(color)
-        if self.markersize != None:
-            markersize = self.markersize
-            
+             label=None, width=2.0):
+        """
+        """
+        if not self.marker == None:
+            self.base.connect.clear([self.marker])
+        self.color = self._color(color)
         self.marker = self.axes.step(x, y, color=self.color,
-                                         marker='',
-                                         linestyle='-', label=label,
-                                         lw=width, zorder=zorder)[0]
-        self.connect_markers([self.marker])
-        self.update()
-               
+                                     marker='',
+                                     linestyle='-', label=label,
+                                     lw=width, zorder=zorder)[0]
+        self.connect_markers([self.marker])
+        self.update()
+
     def connect_markers(self, markers):
         """
@@ -163,5 +157,5 @@
     def clear(self):
         print "plottable_interactor.clear()"
-        
+
     def _on_click(self, evt):
         """
@@ -183,5 +177,5 @@
         if evt.button == 3:
             self._context_menu = True
-        
+
     def _on_enter(self, evt):
         """
@@ -191,5 +185,5 @@
         if not evt.artist.__class__.__name__ == "AxesSubplot":
             self.base.plottable_selected(self.id)
-            
+
             if evt.artist.get_color() == 'y':
                 try:
@@ -212,5 +206,5 @@
 
             self.axes.figure.canvas.draw_idle()
-        
+
     def _on_leave(self, evt):
         """
@@ -230,5 +224,5 @@
                     evt.artist.set_edgecolor(self.color)
                 self.axes.figure.canvas.draw_idle()
-    
+
     def update(self):
         """
Index: src/sas/plottools/plottables.py
===================================================================
--- src/sas/plottools/plottables.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/plottools/plottables.py	(revision 3477478de6317fb51d4dd0dbaf9ab2a1236faf28)
@@ -45,5 +45,5 @@
 import numpy
 import sys
-
+import logging
 
 if 'any' not in dir(__builtins__):
@@ -53,5 +53,5 @@
                 return True
         return False
-    
+
     def all(L):
         for cond in L:
@@ -61,8 +61,8 @@
 
 
-class Graph:
+class Graph(object):
     """
     Generic plottables graph structure.
-    
+
     Plot styles are based on color/symbol lists.  The user gets to select
     the list of colors/symbols/sizes to choose from, not the application
@@ -77,5 +77,5 @@
     the plottable objects themselves will need to provide the transformations.
     Here are some examples from reflectometry: ::
-    
+
        independent: x -> f(x)
           monitor scaling: y -> M*y
@@ -91,5 +91,5 @@
           spin asymmetry: x -> x1, y -> (y1 - y2)/(y1 + y2)
           vector net: x -> x1, y -> y1*cos(y2*pi/180)
-          
+
     Multiple transformations are possible, such as Q4 spin asymmetry
 
@@ -122,5 +122,5 @@
     Graphs need to be printable.  A page layout program for entire plots
     would be nice.
-    
+
     """
     def _xaxis_transformed(self, name, units):
@@ -134,5 +134,5 @@
         self.prop["xlabel"] = name
         self.prop["xunit"] = units
-        
+
     def _yaxis_transformed(self, name, units):
         """
@@ -145,5 +145,5 @@
         self.prop["ylabel"] = name
         self.prop["yunit"] = units
-        
+
     def xaxis(self, name, units):
         """
@@ -167,5 +167,5 @@
         self.prop["ylabel_base"] = name
         self.prop["yunit_base"] = units
-        
+
     def title(self, name):
         """
@@ -173,5 +173,5 @@
         """
         self.prop["title"] = name
-        
+
     def get(self, key):
         """
@@ -216,11 +216,11 @@
         """Detect if any graphed plottables have changed"""
         return any([p.changed() for p in self.plottables])
-    
+
     def get_range(self):
         """
         Return the range of all displayed plottables
         """
-        min = None
-        max = None
+        min_value = None
+        max_value = None
         for p in self.plottables:
             if p.hidden == True:
@@ -228,10 +228,10 @@
             if not p.x == None:
                 for x_i in p.x:
-                    if min == None or x_i < min:
-                        min = x_i
-                    if max == None or x_i > max:
-                        max = x_i
-        return min, max
-    
+                    if min_value == None or x_i < min_value:
+                        min_value = x_i
+                    if max_value == None or x_i > max_value:
+                        max_value = x_i
+        return min_value, max_value
+
     def replace(self, plottable):
         """Replace an existing plottable from the graph"""
@@ -252,5 +252,5 @@
             del self.plottables[plottable]
             self.color = len(self.plottables)
-            
+
     def reset_scale(self):
         """
@@ -268,5 +268,5 @@
                      "title": ""}
         self.plottables = {}
-    
+
     def _make_labels(self):
         """
@@ -284,5 +284,5 @@
             labels.update(c.labels(sets[c]))
         return labels
-    
+
     def get_plottable(self, name):
         """
@@ -294,5 +294,5 @@
                 return item
         return None
-    
+
     def returnPlottable(self):
         """
@@ -302,6 +302,6 @@
         """
         return self.plottables
-    
-    def render(self,plot):
+
+    def render(self, plot):
         """Redraw the graph"""
         plot.connect.clearall()
@@ -312,10 +312,10 @@
             if p.custom_color is not None:
                 p.render(plot, color=p.custom_color, symbol=0,
-                markersize=p.markersize, label=labels[p])
+                         markersize=p.markersize, label=labels[p])
             else:
                 p.render(plot, color=self.plottables[p], symbol=0,
-                     markersize=p.markersize, label=labels[p])
+                         markersize=p.markersize, label=labels[p])
         plot.render()
-   
+
     def __init__(self, **kw):
         self.reset()
@@ -328,24 +328,24 @@
 # No need to inherit from this class, just need to provide
 # the same methods.
-class Transform:
+class Transform(object):
     """
     Define a transform plugin to the plottable architecture.
-    
+
     Transforms operate on axes.  The plottable defines the
     set of transforms available for it, and the axes on which
     they operate.  These transforms can operate on the x axis
     only, the y axis only or on the x and y axes together.
-    
+
     This infrastructure is not able to support transformations
     such as log and polar plots as these require full control
     over the drawing of axes and grids.
-    
+
     A transform has a number of attributes.
-    
+
     name
       user visible name for the transform.  This will
       appear in the context menu for the axis and the transform
       menu for the graph.
-        
+
     type
       operational axis.  This determines whether the
@@ -353,16 +353,16 @@
       menus, or if it should appear in the context menu for
       the graph.
-        
+
     inventory
-      (not implemented) 
+      (not implemented)
       a dictionary of user settable parameter names and
       their associated types.  These should appear as keyword
       arguments to the transform call.  For example, Fresnel
       reflectivity requires the substrate density:
-      ``{ 'rho': type.Value(10e-6/units.angstrom**2) }``       
+      ``{ 'rho': type.Value(10e-6/units.angstrom**2) }``
       Supply reasonable defaults in the callback so that
       limited plotting clients work even though they cannot
       set the inventory.
-        
+
     """
     def __call__(self, plottable, **kwargs):
@@ -375,5 +375,5 @@
         plottable should store the underlying data but set
         the standard x,dx,y,dy,z,dz attributes appropriately.
-        
+
         If the call raises a NotImplemented error the dataline
         will not be plotted.  The associated string will usually
@@ -381,5 +381,5 @@
         The application may or may not display the message to the
         user, along with an indication of which plottable was at fault.
-        
+
         """
         raise NotImplemented, "Not a valid transform"
@@ -428,6 +428,6 @@
     name = None
     # Data
-    x  = None
-    y  = None
+    x = None
+    y = None
     dx = None
     dy = None
@@ -438,5 +438,5 @@
     custom_color = None
     markersize = 5  # default marker size is 'size 5'
-    
+
     def __init__(self):
         self.view = View()
@@ -445,5 +445,5 @@
         self._yaxis = ""
         self._yunit = ""
-        
+
     def __setattr__(self, name, value):
         """
@@ -454,5 +454,5 @@
         if name in ['x', 'y', 'dx', 'dy']:
             self.reset_view()
-            #print "self.%s has been called" % name
+            # print "self.%s has been called" % name
 
     def set_data(self, x, y, dx=None, dy=None):
@@ -464,12 +464,12 @@
         self.dx = dx
         self.transformView()
-    
+
     def xaxis(self, name, units):
         """
         Set the name and unit of x_axis
-        
+
         :param name: the name of x-axis
         :param units: the units of x_axis
-        
+
         """
         self._xaxis = name
@@ -479,16 +479,16 @@
         """
         Set the name and unit of y_axis
-        
+
         :param name: the name of y-axis
         :param units: the units of y_axis
-        
+
         """
         self._yaxis = name
         self._yunit = units
-        
+
     def get_xaxis(self):
         """Return the units and name of x-axis"""
         return self._xaxis, self._xunit
-    
+
     def get_yaxis(self):
         """ Return the units and name of y- axis"""
@@ -500,32 +500,32 @@
         Construct a set of unique labels for a collection of plottables of
         the same type.
-        
+
         Returns a map from plottable to name.
-        
+
         """
         n = len(collection)
-        map = {}
+        label_dict = {}
         if n > 0:
             basename = str(cls).split('.')[-1]
             if n == 1:
-                map[collection[0]] = basename
+                label_dict[collection[0]] = basename
             else:
                 for i in xrange(len(collection)):
-                    map[collection[i]] = "%s %d" % (basename, i)
-        return map
-
-    ##Use the following if @classmethod doesn't work
+                    label_dict[collection[i]] = "%s %d" % (basename, i)
+        return label_dict
+
+    # #Use the following if @classmethod doesn't work
     # labels = classmethod(labels)
     def setLabel(self, labelx, labely):
         """
         It takes a label of the x and y transformation and set View parameters
-        
+
         :param transx: The label of x transformation is sent by Properties Dialog
         :param transy: The label of y transformation is sent Properties Dialog
-        
+
         """
         self.view.xLabel = labelx
         self.view.yLabel = labely
-    
+
     def set_View(self, x, y):
         """Load View"""
@@ -533,5 +533,5 @@
         self.y = y
         self.reset_view()
-        
+
     def reset_view(self):
         """Reload view with new value to plot"""
@@ -541,18 +541,18 @@
         self.view.DXreel = self.view.dx
         self.view.DYreel = self.view.dy
-        
+
     def render(self, plot):
         """
         The base class makes sure the correct units are being used for
         subsequent plottable.
-        
+
         For now it is assumed that the graphs are commensurate, and if you
-        put a Qx object on a Temperature graph then you had better hope 
+        put a Qx object on a Temperature graph then you had better hope
         that it makes sense.
-        
+
         """
         plot.xaxis(self._xaxis, self._xunit)
         plot.yaxis(self._yaxis, self._yunit)
-        
+
     def is_empty(self):
         """
@@ -563,9 +563,9 @@
             return True
         return False
-        
+
     def colors(self):
         """Return the number of colors need to render the object"""
         return 1
-    
+
     def transformView(self):
         """
@@ -573,5 +573,5 @@
         """
         self.view.transform(self.x, self.y, self.dx, self.dy)
-        
+
     def returnValuesOfView(self):
         """
@@ -579,5 +579,5 @@
         """
         return self.view.returnXview()
-    
+
     def check_data_PlottableX(self):
         """
@@ -586,34 +586,34 @@
         """
         self.view.check_data_logX()
-        
+
     def check_data_PlottableY(self):
         """
-        Since no transformation is made for log10(y), check that 
+        Since no transformation is made for log10(y), check that
         no negative values is plot in log scale
         """
         self.view.check_data_logY()
-        
+
     def transformX(self, transx, transdx):
         """
         Receive pointers to function that transform x and dx
         and set corresponding View pointers
-        
+
         :param transx: pointer to function that transforms x
         :param transdx: pointer to function that transforms dx
-        
+
         """
         self.view.setTransformX(transx, transdx)
-        
+
     def transformY(self, transy, transdy):
         """
         Receive pointers to function that transform y and dy
         and set corresponding View pointers
-        
+
         :param transy: pointer to function that transforms y
         :param transdy: pointer to function that transforms dy
-        
+
         """
         self.view.setTransformY(transy, transdy)
-        
+
     def onReset(self):
         """
@@ -621,17 +621,17 @@
         """
         self.view.onResetView()
-        
+
     def onFitRange(self, xmin=None, xmax=None):
         """
         It limits View data range to plot from min to max
-        
+
         :param xmin: the minimum value of x to plot.
         :param xmax: the maximum value of x to plot
-        
+
         """
         self.view.onFitRangeView(xmin, xmax)
-    
-    
-class View:
+
+
+class View(object):
     """
     Representation of the data that might include a transformation
@@ -672,5 +672,5 @@
         :param dx: array of  errors values on x
         :param dy: array of error values on y
-        
+
         """
         # Sanity check
@@ -678,5 +678,5 @@
         has_err_x = not (dx == None or len(dx) == 0)
         has_err_y = not (dy == None or len(dy) == 0)
-        
+
         if(x != None) and (y != None):
             if not dx == None and not len(dx) == 0 and not len(x) == len(dx):
@@ -689,5 +689,5 @@
                 msg += "and x are not of the same length"
                 raise ValueError, msg
-        
+
             if not dy == None and not len(dy) == 0 and not len(y) == len(dy):
                 msg = "Plottable.View: Given y and dy are not of the same "
@@ -750,5 +750,5 @@
             self.DXreel = self.dx
             self.DYreel = self.dy
-                
+
     def onResetView(self):
         """
@@ -760,10 +760,10 @@
         self.dx = self.DXreel
         self.dy = self.DYreel
-        
+
     def setTransformX(self, funcx, funcdx):
         """
         Receive pointers to function that transform x and dx
         and set corresponding View pointers
-        
+
         :param transx: pointer to function that transforms x
         :param transdx: pointer to function that transforms dx
@@ -771,10 +771,10 @@
         self.funcx = funcx
         self.funcdx = funcdx
-        
+
     def setTransformY(self, funcy, funcdy):
         """
         Receive pointers to function that transform y and dy
         and set corresponding View pointers
-        
+
         :param transx: pointer to function that transforms y
         :param transdx: pointer to function that transforms dy
@@ -782,5 +782,5 @@
         self.funcy = funcy
         self.funcdy = funcdy
-   
+
     def returnXview(self):
         """
@@ -788,5 +788,5 @@
         """
         return self.x, self.y, self.dx, self.dy
-    
+
     def check_data_logX(self):
         """
@@ -805,5 +805,5 @@
             for i in range(len(self.x)):
                 try:
-                    if (self.x[i] > 0):
+                    if self.x[i] > 0:
                         tempx.append(self.x[i])
                         tempdx.append(self.dx[i])
@@ -811,17 +811,16 @@
                         tempdy.append(self.dy[i])
                 except:
-                    print "check_data_logX: skipping point x %g" % self.x[i]
-                    print sys.exc_value
-                    pass 
+                    logging.error("check_data_logX: skipping point x %g", self.x[i])
+                    logging.error(sys.exc_value)
             self.x = tempx
             self.y = tempy
             self.dx = tempdx
             self.dy = tempdy
-        
+
     def check_data_logY(self):
         """
         Remove negative value in y vector
         to avoid plotting negative value of Log10
-        
+
         """
         tempx = []
@@ -833,8 +832,8 @@
         if self.dy == None:
             self.dy = numpy.zeros(len(self.y))
-        if (self.yLabel == "log10(y)"):
+        if self.yLabel == "log10(y)":
             for i in range(len(self.x)):
                 try:
-                    if (self.y[i] > 0):
+                    if self.y[i] > 0:
                         tempx.append(self.x[i])
                         tempdx.append(self.dx[i])
@@ -842,19 +841,19 @@
                         tempdy.append(self.dy[i])
                 except:
-                    print "check_data_logY: skipping point %g" % self.y[i]
-                    print sys.exc_value
-                    pass
+                    logging.error("check_data_logY: skipping point %g", self.y[i])
+                    logging.error(sys.exc_value)
+
             self.x = tempx
             self.y = tempy
             self.dx = tempdx
             self.dy = tempdy
-            
+
     def onFitRangeView(self, xmin=None, xmax=None):
         """
         It limits View data range to plot from min to max
-        
+
         :param xmin: the minimum value of x to plot.
         :param xmax: the maximum value of x to plot
-        
+
         """
         tempx = []
@@ -866,7 +865,7 @@
         if self.dy == None:
             self.dy = numpy.zeros(len(self.y))
-        if (xmin != None) and (xmax != None):
+        if xmin != None and xmax != None:
             for i in range(len(self.x)):
-                if (self.x[i] >= xmin) and (self.x[i] <= xmax):
+                if self.x[i] >= xmin and self.x[i] <= xmax:
                     tempx.append(self.x[i])
                     tempdx.append(self.dx[i])
@@ -878,5 +877,5 @@
             self.dy = tempdy
 
-              
+
 class Data2D(Plottable):
     """
@@ -884,6 +883,6 @@
     """
     def __init__(self, image=None, qx_data=None, qy_data=None,
-                  err_image=None, xmin=None, xmax=None, ymin=None,
-                  ymax=None, zmin=None, zmax=None):
+                 err_image=None, xmin=None, xmax=None, ymin=None,
+                 ymax=None, zmin=None, zmax=None):
         """
         Draw image
@@ -898,8 +897,8 @@
         self.source = None
         self.detector = []
-    
-        ## Units for Q-values
+
+        # # Units for Q-values
         self.xy_unit = 'A^{-1}'
-        ## Units for I(Q) values
+        # # Units for I(Q) values
         self.z_unit = 'cm^{-1}'
         self._zaxis = ''
@@ -910,60 +909,60 @@
         self._yaxis = '\\rm{Q_{y}}'
         self._yunit = 'A^{-1}'
-        
-        ### might remove that later
-        ## Vector of Q-values at the center of each bin in x
+
+        # ## might remove that later
+        # # Vector of Q-values at the center of each bin in x
         self.x_bins = []
-        ## Vector of Q-values at the center of each bin in y
+        # # Vector of Q-values at the center of each bin in y
         self.y_bins = []
-        
-        #x and y boundaries
+
+        # x and y boundaries
         self.xmin = xmin
         self.xmax = xmax
         self.ymin = ymin
         self.ymax = ymax
-        
+
         self.zmin = zmin
         self.zmax = zmax
         self.id = None
-        
+
     def xaxis(self, label, unit):
         """
         set x-axis
-        
+
         :param label: x-axis label
         :param unit: x-axis unit
-        
+
         """
         self._xaxis = label
         self._xunit = unit
-        
+
     def yaxis(self, label, unit):
         """
         set y-axis
-        
+
         :param label: y-axis label
         :param unit: y-axis unit
-        
+
         """
         self._yaxis = label
         self._yunit = unit
-        
+
     def zaxis(self, label, unit):
         """
         set z-axis
-        
+
         :param label: z-axis label
         :param unit: z-axis unit
-        
+
         """
         self._zaxis = label
         self._zunit = unit
-        
+
     def setValues(self, datainfo=None):
         """
         Use datainfo object to initialize data2D
-        
+
         :param datainfo: object
-        
+
         """
         self.image = copy.deepcopy(datainfo.data)
@@ -971,21 +970,21 @@
         self.qy_data = copy.deepcopy(datainfo.qy_data)
         self.err_image = copy.deepcopy(datainfo.err_data)
-        
+
         self.xy_unit = datainfo.Q_unit
         self.z_unit = datainfo.I_unit
         self._zaxis = datainfo._zaxis
-       
+
         self.xaxis(datainfo._xunit, datainfo._xaxis)
         self.yaxis(datainfo._yunit, datainfo._yaxis)
-        #x and y boundaries
+        # x and y boundaries
         self.xmin = datainfo.xmin
         self.xmax = datainfo.xmax
         self.ymin = datainfo.ymin
         self.ymax = datainfo.ymax
-        ## Vector of Q-values at the center of each bin in x
+        # # Vector of Q-values at the center of each bin in x
         self.x_bins = datainfo.x_bins
-        ## Vector of Q-values at the center of each bin in y
+        # # Vector of Q-values at the center of each bin in y
         self.y_bins = datainfo.y_bins
-        
+
     def set_zrange(self, zmin=None, zmax=None):
         """
@@ -996,30 +995,28 @@
         else:
             raise "zmin is greater or equal to zmax "
-        
+
     def render(self, plot, **kw):
         """
         Renders the plottable on the graph
-        
+
         """
         plot.image(self.data, self.qx_data, self.qy_data,
                    self.xmin, self.xmax, self.ymin,
                    self.ymax, self.zmin, self.zmax, **kw)
-       
+
     def changed(self):
         """
         """
         return False
-    
+
     @classmethod
     def labels(cls, collection):
         """Build a label mostly unique within a collection"""
-        map = {}
+        label_dict = {}
         for item in collection:
-            #map[item] = label(item, collection)
-            #map[item] = r"$\rm{%s}$" % item.name
             if item.label == "Data2D":
                 item.label = item.name
-            map[item] = item.label
-        return map
+            label_dict[item] = item.label
+        return label_dict
 
 
@@ -1028,5 +1025,5 @@
     Data plottable: scatter plot of x,y with errors in x and y.
     """
-    
+
     def __init__(self, x, y, dx=None, dy=None):
         """
@@ -1056,5 +1053,5 @@
         self.zorder = 1
         self.hide_error = False
-      
+
     def render(self, plot, **kw):
         """
@@ -1068,7 +1065,7 @@
             plot.interactive_points(self.view.x, self.view.y,
                                     dx=self.view.dx, dy=self.view.dy,
-              name=self.name, zorder=self.zorder, **kw)
+                                    name=self.name, zorder=self.zorder, **kw)
         else:
-            kw['id'] =  self.id
+            kw['id'] = self.id
             kw['hide_error'] = self.hide_error
             kw['symbol'] = self.symbol
@@ -1076,7 +1073,7 @@
             kw['markersize'] = self.markersize
             plot.points(self.view.x, self.view.y, dx=self.view.dx,
-                dy=self.view.dy, zorder=self.zorder, 
-                marker=self.symbollist[self.symbol], **kw)
-       
+                        dy=self.view.dy, zorder=self.zorder,
+                        marker=self.symbollist[self.symbol], **kw)
+
     def changed(self):
         return False
@@ -1085,18 +1082,15 @@
     def labels(cls, collection):
         """Build a label mostly unique within a collection"""
-        map = {}
+        label_dict = {}
         for item in collection:
-            #map[item] = label(item, collection)
-            #map[item] = r"$\rm{%s}$" % item.name
             if item.label == "data":
                 item.label = item.name
-            map[item] = item.label
-        return map
-    
-    
+            label_dict[item] = item.label
+        return label_dict
+
+
 class Theory1D(Plottable):
     """
     Theory plottable: line plot of x,y with confidence interval y.
-    
     """
     def __init__(self, x, y, dy=None):
@@ -1105,50 +1099,11 @@
         Confidence intervals in x are given by dx[i] or by (xlo[i],xhi[i])
         if the limits are asymmetric.
-        
+
         The title is the name that will show up on the legend.
         """
         Plottable.__init__(self)
-        msg = "Theory1D is no longer supported, please use Data1D and change"
-        msg += " symbol.\n"
+        msg = "Theory1D is no longer supported, please use Data1D and change symbol.\n"
         raise DeprecationWarning, msg
-        self.name = "theory"
-        self.label = "theory"
-        self.x = x
-        self.y = y
-        self.dy = dy
-        self.xaxis('', '')
-        self.yaxis('', '')
-        self.view = View(self.x, self.y, None, self.dy)
-        self.symbol = 0
-        self.id = None
-        self.zorder = 10
-        
-    def render(self, plot, **kw):
-        """
-        """
-        if self.interactive == True:
-            kw['id'] = self.id
-            plot.interactive_curve(self.view.x, self.view.y,
-                                   dy=self.view.dy,
-                                   name=self.name, zorder=self.zorder, **kw)
-        else:
-            kw['id'] = self.id
-            plot.curve(self.view.x, self.view.y, dy=self.view.dy, 
-                       zorder=self.zorder, **kw)
-            
-    def changed(self):
-        return False
-    
-    @classmethod
-    def labels(cls, collection):
-        """Build a label mostly unique within a collection"""
-        map = {}
-        for item in collection:
-            if item.label == "theory":
-                item.label = item.name
-            map[item] = item.label
-        return map
-   
-   
+
 class Fit1D(Plottable):
     """
@@ -1159,5 +1114,5 @@
 
     The color of the data and theory will be shared.
-    
+
     """
     def __init__(self, data=None, theory=None):
@@ -1194,5 +1149,5 @@
         self.xpos = xpos
         self.ypos = ypos
-        
+
     def render(self, plot, **kw):
         """
@@ -1206,7 +1161,6 @@
                           self.text,
                           label=self.name,
-                          transform=xcoords,
-                          )
-            
+                          transform=xcoords)
+
     def setText(self, text):
         """Set the text string."""
@@ -1230,5 +1184,5 @@
         """
         self.ypos = y
-     
+
 
 # ---------------------------------------------------------------
@@ -1244,9 +1198,8 @@
         Plottable.__init__(self)
         self.name = "chisq"
-        #super( Chisq, self).__init__(None, None, None, None)
         self._chisq = chisq
         self.xpos = 0.5
         self.ypos = 0.9
-        
+
     def render(self, plot, **kw):
         """
@@ -1260,10 +1213,10 @@
 
         xcoords = transforms.blended_transform_factory(plot.subplot.transAxes,
-                                                     plot.subplot.transAxes)
+                                                      plot.subplot.transAxes)
         plot.subplot.text(self.xpos,
                           self.ypos,
                           chisqTxt, label='chisq',
-                          transform=xcoords,)
-            
+                          transform=xcoords)
+
     def setChisq(self, chisq):
         """
@@ -1277,9 +1230,9 @@
 def sample_graph():
     import numpy as nx
-    
+
     # Construct a simple graph
     if False:
-        x = nx.array([1,2,3,4,5,6], 'd')
-        y = nx.array([4,5,6,5,4,5], 'd')
+        x = nx.array([1, 2, 3, 4, 5, 6], 'd')
+        y = nx.array([4, 5, 6, 5, 4, 5], 'd')
         dy = nx.array([0.2, 0.3, 0.1, 0.2, 0.9, 0.3])
     else:
@@ -1300,5 +1253,5 @@
     import wx
     from pylab_plottables import Plotter
-    #from mplplotter import Plotter
+    # from mplplotter import Plotter
 
     # Make a frame to show it
@@ -1310,11 +1263,11 @@
     # render the graph to the pylab plotter
     graph.render(plotter)
-    
-    class GraphUpdate:
+
+    class GraphUpdate(object):
         callnum = 0
-        
+
         def __init__(self, graph, plotter):
             self.graph, self.plotter = graph, plotter
-        
+
         def __call__(self):
             if self.graph.changed():
@@ -1322,8 +1275,8 @@
                 return True
             return False
-        
+
         def onIdle(self, event):
             self.callnum = self.callnum + 1
-            if self.__call__(): 
+            if self.__call__():
                 pass  # event.RequestMore()
     update = GraphUpdate(graph, plotter)
Index: src/sas/plottools/toolbar.py
===================================================================
--- src/sas/plottools/toolbar.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/plottools/toolbar.py	(revision 3477478de6317fb51d4dd0dbaf9ab2a1236faf28)
@@ -9,12 +9,12 @@
 # Event binding code changed after version 2.5
 if wx.VERSION_STRING >= '2.5':
-    def bind(actor,event,action,**kw):
-        actor.Bind(event,action,**kw)
+    def bind(actor, event, action, **kw):
+        actor.Bind(event, action, **kw)
 else:
-    def bind(actor,event,action,id=None):
+    def bind(actor, event, action, id=None):
         if id is not None:
             event(actor, id, action)
         else:
-            event(actor,action)
+            event(actor, action)
 
 class NavigationToolBar(NavigationToolbar2WxAgg):
@@ -28,14 +28,15 @@
     try: save_figure = NavigationToolbar2WxAgg.save
     except AttributeError: pass
+    
     def _init_toolbar(self):
         self._parent = self.canvas.GetParent()
-        _NTB2_HOME         = wx.NewId()
-        self._NTB2_BACK    = wx.NewId()
+        _NTB2_HOME = wx.NewId()
+        self._NTB2_BACK = wx.NewId()
         self._NTB2_FORWARD = wx.NewId()
-        self._NTB2_PAN     = wx.NewId()
-        self._NTB2_ZOOM    = wx.NewId()
-        _NTB2_SAVE         = wx.NewId()
-        _NTB2_PRINT        = wx.NewId()
-        _NTB2_RESET        = wx.NewId()
+        self._NTB2_PAN = wx.NewId()
+        self._NTB2_ZOOM = wx.NewId()
+        _NTB2_SAVE = wx.NewId()
+        _NTB2_PRINT = wx.NewId()
+        _NTB2_RESET = wx.NewId()
 
         # for mpl 1.2+ compatibility
@@ -46,5 +47,5 @@
         self.wx_ids['Zoom'] = self._NTB2_ZOOM
 
-        self.SetToolBitmapSize(wx.Size(24,24))
+        self.SetToolBitmapSize(wx.Size(24, 24))
 
         context_tip = 'Graph Menu: \n'
@@ -55,5 +56,5 @@
 
         self.InsertSeparator(1)
-        
+
         self.AddSimpleTool(self._NTB2_BACK, _load_bitmap('back.png'),
                            'Back', 'Back navigation view')
@@ -62,16 +63,16 @@
         # todo: get new bitmap
         self.AddCheckTool(self._NTB2_PAN, _load_bitmap('move.png'),
-                           shortHelp='Pan',
-                           longHelp='Pan with left, zoom with right')
+                          shortHelp='Pan',
+                          longHelp='Pan with left, zoom with right')
         self.AddCheckTool(self._NTB2_ZOOM, _load_bitmap('zoom_to_rect.png'),
-                           shortHelp='Zoom', longHelp='Zoom to rectangle')
+                          shortHelp='Zoom', longHelp='Zoom to rectangle')
 
         self.AddSeparator()
         self.AddSimpleTool(_NTB2_SAVE, _load_bitmap('filesave.png'),
                            'Save', 'Save plot contents to file')
-        
+
         print_bmp = wx.ArtProvider.GetBitmap(wx.ART_PRINT, wx.ART_TOOLBAR)
         self.AddSimpleTool(_NTB2_PRINT, print_bmp, 'Print', 'Print plot')
-        
+
         reset_bmp = wx.ArtProvider.GetBitmap(wx.ART_GO_HOME, wx.ART_TOOLBAR)
         self.AddSimpleTool(_NTB2_RESET, reset_bmp, 'Reset', 'Reset graph range')
@@ -114,3 +115,2 @@
         except:
             logging.error("Plot toolbar could not print")
-        
Index: src/sas/plottools/transform.py
===================================================================
--- src/sas/plottools/transform.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ src/sas/plottools/transform.py	(revision 3477478de6317fb51d4dd0dbaf9ab2a1236faf28)
@@ -1,13 +1,13 @@
 import math
-         
-         
+
+
 def toX(x, y=None):
     """
     This function is used to load value on Plottable.View
-    
+
     :param x: Float value
-    
+
     :return: x
-    
+
     """
     return x
@@ -17,9 +17,9 @@
     """
     This function is used to load value on Plottable.View
-    
+
     :param x: Float value
-    
+
     :return: x
-    
+
     """
     if not x > 0:
@@ -32,9 +32,9 @@
     """
     This function is used to load value on Plottable.View
-    
+
     Calculate x^(2)
-    
-    :param x: float value
-    
+
+    :param x: float value
+
     """
     return x * x
@@ -45,7 +45,7 @@
     This function is used to load value on Plottable.View
     Calculate square root of x
-     
-    :param x: float value
-     
+
+    :param x: float value
+
     """
     if not x >= 0:
@@ -58,9 +58,9 @@
     """
     This function is used to load value on Plottable.View
-    
+
     Calculate x^(4)
-    
-    :param x: float value
-    
+
+    :param x: float value
+
     """
     return x * x * x * x
@@ -71,7 +71,7 @@
     This function is used to load value on Plottable.View
     Calculate square root of x
-     
-    :param x: float value
-     
+
+    :param x: float value
+
     """
     if not x >= 0:
@@ -79,5 +79,5 @@
     else:
         return math.sqrt(math.sqrt(x))
-         
+
 
 def toLogX(x, y=None):
@@ -85,7 +85,7 @@
     This function is used to load value on Plottable.View
     calculate log x
-    
-    :param x: float value
-    
+
+    :param x: float value
+
     """
     if not x > 0:
@@ -93,41 +93,41 @@
     else:
         return math.log(x)
-    
+
 def toOneOverX(x, y=None):
     """
     """
     if x != 0:
-        return 1/x
+        return 1 / x
     else:
         raise ValueError, "cannot divide by zero"
-    
-    
+
+
 def toOneOverSqrtX(y, x=None):
     """
     """
     if y > 0:
-        return 1/math.sqrt(y)
+        return 1 / math.sqrt(y)
     else:
         raise ValueError, "transform.toOneOverSqrtX: cannot be computed"
-    
-    
+
+
 def toLogYX2(y, x):
     """
     """
-    if (y * (x**2)) > 0:
-        return math.log(y * (x**2))
+    if (y * (x ** 2)) > 0:
+        return math.log(y * (x ** 2))
     else:
         raise ValueError, "transform.toLogYX2: cannot be computed"
-     
-     
+
+
 def toLogYX4(y, x):
     """
     """
     if (math.pow(x, 4) * y) > 0:
-        return math.log(math.pow(x,4) * y)
-    else:
-        raise ValueError,"transform.toLogYX4: input error"
-     
-     
+        return math.log(math.pow(x, 4) * y)
+    else:
+        raise ValueError, "transform.toLogYX4: input error"
+
+
 def toYX4(y, x):
     """
@@ -144,7 +144,7 @@
     This function is used to load value on Plottable.View
     calculate log x
-    
-    :param x: float value
-    
+
+    :param x: float value
+
     """
     if not (x * y) > 0:
@@ -157,8 +157,8 @@
     """
     calculate error of x**2
-    
-    :param x: float value
-    :param dx: float value
-    
+
+    :param x: float value
+    :param dx: float value
+
     """
     if dx == None:
@@ -170,8 +170,8 @@
     """
     calculate error of x**2
-    
-    :param x: float value
-    :param dx: float value
-    
+
+    :param x: float value
+    :param dx: float value
+
     """
     if dx == None:
@@ -183,8 +183,8 @@
     """
     calculate error of x**2
-    
-    :param x: float value
-    :param dx: float value
-    
+
+    :param x: float value
+    :param dx: float value
+
     """
     if  dx != None:
@@ -193,16 +193,16 @@
     else:
         return 0.0
-    
-    
+
+
 def errFromX2(x, y=None, dx=None, dy=None):
     """
     calculate error of sqrt(x)
-    
-    :param x: float value
-    :param dx: float value
-    
-    """
-    if (x > 0):
-        if(dx != None):
+
+    :param x: float value
+    :param dx: float value
+
+    """
+    if x > 0:
+        if dx != None:
             err = dx / (2 * math.sqrt(x))
         else:
@@ -217,27 +217,27 @@
     """
     calculate error of x**4
-    
-    :param x: float value
-    :param dx: float value
-    
-    """
-    if  dx != None:
+
+    :param x: float value
+    :param dx: float value
+
+    """
+    if dx != None:
         err = 4 * math.pow(x, 3) * dx
         return math.fabs(err)
     else:
         return 0.0
-    
-    
+
+
 def errFromX4(x, y=None, dx=None, dy=None):
     """
     calculate error of x^1/4
-    
-    :param x: float value
-    :param dx: float value
-    
-    """
-    if (x > 0):
-        if(dx != None):
-            err = dx / (4 * math.pow(x, 3/4))
+
+    :param x: float value
+    :param dx: float value
+
+    """
+    if x > 0:
+        if dx != None:
+            err = dx / (4 * math.pow(x, 3 / 4))
         else:
             err = 0
@@ -246,17 +246,17 @@
         msg = "transform.errFromX4: can't compute error of negative x"
         raise ValueError, msg
- 
- 
+
+
 def errToLog10X(x, y=None, dx=None, dy=None):
     """
     calculate error of Log(x)
-    
-    :param x: float value
-    :param dx: float value
-    
-    """
-    if dx == None:
-        dx = 0
-        
+
+    :param x: float value
+    :param dx: float value
+
+    """
+    if dx == None:
+        dx = 0
+
     # Check that the point on the graph is positive
     # within errors
@@ -270,20 +270,20 @@
         raise ValueError, "errToLogX: divide by zero"
     return dx
-    
-    
+
+
 def errToLogX(x, y=None, dx=None, dy=None):
     """
     calculate error of Log(x)
-    
-    :param x: float value
-    :param dx: float value
-    
-    """
-    if dx == None:
-        dx = 0
-            
+
+    :param x: float value
+    :param dx: float value
+
+    """
+    if dx == None:
+        dx = 0
+
     # Check that the x point on the graph is zero
     if x != 0:
-        dx = dx/x
+        dx = dx / x
     else:
         raise ValueError, "errToLogX: divide by zero"
@@ -298,12 +298,87 @@
     if dy == None:
         dy = 0
-    err = math.sqrt((2 * x * y * dx)**2 + ((x**2) * dy)**2)
+    err = math.sqrt((2 * x * y * dx) ** 2 + ((x ** 2) * dy) ** 2)
     return err
-    
-    
+
+
 def errToLogXY(x, y, dx=None, dy=None):
     """
     calculate error of Log(xy)
-    
+
+    """
+    # Check that the point on the graph is positive
+    # within errors
+    if not (x - dx) > 0 or not (y - dy) > 0:
+        msg = "Transformation does not accept point "
+        msg += " that are consistent with zero."
+        raise ValueError, msg
+    if x != 0 and y != 0:
+        if dx == None:
+            dx = 0
+        if dy == None:
+            dy = 0
+        err = (dx / x) ** 2 + (dy / y) ** 2
+    else:
+        raise ValueError, "cannot compute this error"
+
+    return math.sqrt(math.fabs(err))
+
+
+def errToLogYX2(x, y, dx=None, dy=None):
+    """
+    calculate error of Log(yx**2)
+
+    """
+    # Check that the point on the graph is positive
+    # within errors
+    if not (x - dx) > 0 or not (y - dy) > 0:
+        msg = "Transformation does not accept point"
+        msg += " that are consistent with zero."
+        raise ValueError, msg
+    if x > 0 and y > 0:
+        if dx == None:
+            dx = 0
+        if dy == None:
+            dy = 0
+        err = (2.0 * dx / x) ** 2 + (dy / y) ** 2
+    else:
+        raise ValueError, "cannot compute this error"
+    return math.sqrt(math.fabs(err))
+
+
+def errOneOverX(x, y=None, dx=None, dy=None):
+    """
+    calculate error on 1/x
+
+    """
+    if x != 0:
+        if dx == None:
+            dx = 0
+        err = dx / x ** 2
+    else:
+        raise ValueError, "Cannot compute this error"
+    return math.fabs(err)
+
+
+def errOneOverSqrtX(x, y=None, dx=None, dy=None):
+    """
+    Calculate error on 1/sqrt(x)
+
+    """
+    if x > 0:
+        if dx == None:
+            dx = 0
+        err = -1 / 2 * math.pow(x, -3.0 / 2.0) * dx
+    else:
+        raise ValueError, "Cannot compute this error"
+    return math.fabs(err)
+
+
+def errToLogYX4(x, y=None, dx=None, dy=None):
+    """
+    error for ln(y*x^(4))
+
+    :param x: float value
+
     """
     # Check that the point on the graph is positive
@@ -313,101 +388,26 @@
         msg += " that are consistent with zero."
         raise ValueError, msg
-    if (x != 0) and (y != 0):
-        if dx == None:
-            dx = 0
-        if dy == None:
-            dy = 0
-        err = (dx/x)**2 + (dy/y)**2
-    else:
-        raise ValueError, "cannot compute this error"
-   
-    return math.sqrt(math.fabs(err))
-    
-    
-def errToLogYX2(x, y, dx=None, dy=None):
-    """
-    calculate error of Log(yx**2)
-    
+    if dx == None:
+        dx = 0
+    if dy == None:
+        dy = 0
+    err = math.sqrt((4.0 * dx / x) ** 2 + (dy / y) ** 2)
+    return err
+
+
+def errToYX4(x, y=None, dx=None, dy=None):
+    """
+    error for (y*x^(4))
+
+    :param x: float value
+
     """
     # Check that the point on the graph is positive
     # within errors
-    if (not (x - dx) > 0) or (not (y - dy) > 0):
-        msg = "Transformation does not accept point"
-        msg += " that are consistent with zero."
-        raise ValueError, msg
-    if (x > 0) and (y > 0):
-        if (dx == None):
-            dx = 0
-        if (dy == None):
-            dy = 0
-        err = (2.0*dx/x)**2 + (dy/y)**2
-    else:
-        raise ValueError, "cannot compute this error"
-    return math.sqrt(math.fabs(err))
-        
-        
-def errOneOverX(x, y=None, dx=None, dy=None):
-    """
-    calculate error on 1/x
-    
-    """
-    if (x != 0):
-        if dx == None:
-            dx = 0
-        err = dx/x**2
-    else:
-        raise ValueError, "Cannot compute this error"
-    return math.fabs(err)
-
-
-def errOneOverSqrtX(x, y=None, dx=None, dy=None):
-    """
-    Calculate error on 1/sqrt(x)
-    
-    """
-    if (x > 0):
-        if dx == None:
-            dx = 0
-        err = -1/2*math.pow(x, -3.0/2.0) * dx
-    else:
-        raise ValueError, "Cannot compute this error"
-    return math.fabs(err)
-
-
-def errToLogYX4(x, y=None, dx=None, dy=None):
-    """
-    error for ln(y*x^(4))
-    
-    :param x: float value
-    
-    """
-    # Check that the point on the graph is positive
-    # within errors
-    if (not (x - dx) > 0) or (not (y - dy) > 0):
-        msg = "Transformation does not accept point "
-        msg += " that are consistent with zero."
-        raise ValueError, msg
+
     if dx == None:
         dx = 0
     if dy == None:
         dy = 0
-    err = math.sqrt((4.0 * dx/x)**2  + (dy/y)**2)
+    err = math.sqrt((dy * pow(x, 4)) ** 2 + (4 * y * dx * math.pow(x, 3)) ** 2)
     return err
-
-
-def errToYX4(x, y=None, dx=None, dy=None):
-    """
-    error for (y*x^(4))
-    
-    :param x: float value
-    
-    """
-    # Check that the point on the graph is positive
-    # within errors
-
-    if dx == None:
-        dx = 0
-    if dy == None:
-        dy = 0
-    err = math.sqrt((dy * pow(x, 4))**2  + (4 * y * dx * math.pow(x, 3))**2)
-    return err
Index: src/sas/plottools/unitConverter.py
===================================================================
--- src/sas/plottools/unitConverter.py	(revision 794922220f2fb3b23dd08c648aabf87b4850596c)
+++ 	(revision )
@@ -1,83 +1,0 @@
-import re
-import string
-#Input   ->  new scale  ->  Output
-
-unit1 = "A^{-1} "  #             x                    A^{-1}
-unit2 = "A"  #                   x                     A
-unit3 = "A"  #                   x^2                  A^{2}
-unit4 = "A "  #                  1/x                  A^{-1}
-unit5 = "A^{0.5} "  #        x^2                      A
-unit9 = "m^{1/2}"  #         x^2               m
-
-#If you don't recognize the pattern, give up
-# and just put some parentheses around the unit and write the transoformation:
-
-unit6 = "m/s"  #                x^2               (m/s)^{2}
-unit7 = "m/s^{2}"  #         1/x                 (m/s^{2})^{-1}
-unit8 = "m/s^{4}"  #         x^2               (m/s^{4})^{2}
-
-
-def UnitConvertion(pow, unit):
-    """
-    """
-    if pow != 0:
-        if string.find(unit, "^") != -1:  # if the unit contains a power ^
-            unitSplitted = re.split("\^", unit)
-            if string.find(unitSplitted[0], "/") != -1 or\
-                string.find(unitSplitted[0], "-") != -1 :  # find slash /
-                if pow == 1:
-                    unit = unit
-                else:
-                    unit = "("+unit+")" + "^{"+ str(pow) + "}"
-            else:
-                if string.find(unitSplitted[1], "{") != -1:  # if found a {
-                    findPower = re.split("{", unitSplitted[1])
-                    if string.find(findPower[1], "}") != -1:  # found }
-                        unitPower = re.split("}", findPower[1])
-                        if(string.find(unitPower[0], ".") != -1):
-                            power = float(unitPower[0]) * pow
-                        elif(string.find(unitPower[0], "/") != -1):
-                            #power is a float
-                            poweSplitted = re.split("/", unitPower[0])
-                            power = pow * int(poweSplitted[0])\
-                                         /int(poweSplitted[1])
-                        else:
-                            power = int(unitPower[0]) * pow
-                       
-                        if power == 1.0:
-                            unit = unitSplitted[0]
-                        elif power == 0.5:
-                            unit = unitSplitted[0] + "^{1/2}"
-                        elif power == -0.5:
-                            unit = unitSplitted[0] + "^{-1/2}"
-                        else:
-                            unit = unitSplitted[0] + "^{" + str(power) + "}"
-                else:
-                     raise ValueError, "missing } in unit expression"
-        else:  # no power
-            if  pow != 1:
-                unit = "(" + unit + ")" + "^{" + str(pow) + "}"
-    else:
-        raise ValueError, "empty unit ,enter a power different from zero"
-    return unit
-
-
-if __name__ == "__main__": 
-    print "this unit1 %s ,its power %s , and value %s" % (unit1,
-                                                1, UnitConvertion(1, unit1))
-    print "this unit2 %s ,its power %s , and value %s" % (unit2, 1,
-                                                UnitConvertion(1, unit2))
-    print "this unit3 %s ,its power %s , and value %s" % (unit3, 2,
-                                                    UnitConvertion(2, unit3))
-    print "this unit4 %s ,its power %s , and value %s" % (unit4, -1,
-                                                UnitConvertion(-1, unit4))
-    print "this unit5 %s ,its power %s , and value %s" % (unit5, 2,
-                                                    UnitConvertion(2, unit5))
-    print "this unit6 %s ,its power %s , and value %s" % (unit6, 2,
-                                                    UnitConvertion(2, unit6))
-    print "this unit7 %s ,its power %s , and value %s" % (unit7, -1,
-                                                    UnitConvertion(-1, unit7))
-    print "this unit8 %s ,its power %s , and value %s" % (unit8, 2,
-                                                    UnitConvertion(2, unit8))
-    print "this unit9 %s ,its power %s , and value %s" % (unit9, 2,
-                                                    UnitConvertion(2, unit9))
