Index: guitools/PlotPanel.py
===================================================================
--- guitools/PlotPanel.py	(revision 34ab06d91a04cff75d9ad0ff6c24b7d5f0773933)
+++ guitools/PlotPanel.py	(revision 05da1f8994b512c6a943f61974e1f83b0508cfab)
@@ -15,4 +15,6 @@
 #from plottables import Data1D
 #TODO: make the plottables interactive
+
+DEBUG = False
 
 from plottables import Graph
@@ -147,7 +149,9 @@
         self.ErrBvalue=None
         self.Chivalue=None
+        
     def onWheel(self, event):
         """
-        Process mouse wheel as zoom events
+            Process mouse wheel as zoom events
+            @param event: Wheel event
         """
         ax = event.inaxes
@@ -157,10 +161,12 @@
             # Event occurred inside a plotting area
             lo,hi = ax.get_xlim()
-            lo,hi = _rescale(lo,hi,step,pt=event.xdata)
-            ax.set_xlim((lo,hi))
+            lo,hi = _rescale(lo,hi,step,pt=event.xdata,scale=ax.get_xscale())
+            if not self.xscale=='log' or lo>0:
+                ax.set_xlim((lo,hi))
 
             lo,hi = ax.get_ylim()
-            lo,hi = _rescale(lo,hi,step,pt=event.ydata)
-            ax.set_ylim((lo,hi))
+            lo,hi = _rescale(lo,hi,step,pt=event.ydata,scale=ax.get_yscale())
+            if not self.yscale=='log' or lo>0:
+                ax.set_ylim((lo,hi))
         else:
              # Check if zoom happens in the axes
@@ -172,17 +178,17 @@
                 if insidex:
                     xdata,_ = ax.transAxes.inverse_xy_tup((x,y))
-                    print "xaxis",x,"->",xdata
                 insidey,_ = ax.yaxis.contains(event)
                 if insidey:
                     _,ydata = ax.transAxes.inverse_xy_tup((x,y))
-                    print "yaxis",y,"->",ydata
             if xdata is not None:
                 lo,hi = ax.get_xlim()
                 lo,hi = _rescale(lo,hi,step,bal=xdata,scale=ax.get_xscale())
-                ax.set_xlim((lo,hi))
+                if not self.xscale=='log' or lo>0:
+                    ax.set_xlim((lo,hi))
             if ydata is not None:
                 lo,hi = ax.get_ylim()
                 lo,hi = _rescale(lo,hi,step,bal=ydata,scale=ax.get_yscale())
-                ax.set_ylim((lo,hi))
+                if not self.yscale=='log' or lo>0:
+                    ax.set_ylim((lo,hi))
                
         self.canvas.draw_idle()
@@ -214,5 +220,5 @@
         if len(list.keys())>0:
             first_item = list.keys()[0]
-            dlg = LinearFit( None, first_item, self.onFitDisplay,self.returnTrans, -1, 'Fitting')
+            dlg = LinearFit( None, first_item, self.onFitDisplay,self.returnTrans, -1, 'Linear Fit')
            
             if (self.xmin !=0.0 )and ( self.xmax !=0.0)\
@@ -493,5 +499,5 @@
                 self.set_xscale("log")
                 name, units = item.get_xaxis() 
-                self.graph.xaxis("\log_{10}\ \  %s" % name,  "%s^{-1}" % units)
+                self.graph.xaxis("\log_{10}\ \  (%s)" % name,  "%s^{-1}" % units)
                 
             if ( self.yLabel=="ln(y)" ):
@@ -511,5 +517,5 @@
                 self.set_yscale("log")  
                 name, units = item.get_yaxis()
-                self.graph.yaxis("\log_{10}\ \ %s" % name,  "%s^{-1}" % units)
+                self.graph.yaxis("\log_{10}\ \ (%s)" % name,  "%s^{-1}" % units)
                 
             if ( self.yLabel=="y^(2)" ):
@@ -523,5 +529,5 @@
                 self.set_yscale("linear")
                 name, units = item.get_yaxis()
-                self.graph.yaxis("%s" % name,  "\ \%s" % units)
+                self.graph.yaxis("1/%s" % name,  "\ \%s" % units)
                 
             if ( self.yLabel =="1/sqrt(y)" ):
@@ -529,5 +535,5 @@
                 self.set_yscale("linear")
                 name, units = item.get_yaxis()
-                self.graph.yaxis("\sqrt{%s}" %name,  "%s" % units)
+                self.graph.yaxis("1/\sqrt{%s}" %name,  "%s" % units)
                 
             if ( self.yLabel =="ln(y*x)"):
@@ -536,5 +542,5 @@
                 yname, yunits = item.get_yaxis()
                 xname, xunits = item.get_xaxis()
-                self.graph.yaxis("log\ %s %s" % (yname,xname),  "%s^{-1}%s^{-1}" % (yunits,xunits))
+                self.graph.yaxis("log\ (%s \ \ %s)" % (yname,xname),  "%s^{-1}%s^{-1}" % (yunits,xunits))
                 
             if ( self.yLabel =="ln(y*x^(2))"):
@@ -543,5 +549,5 @@
                 yname, yunits = item.get_yaxis()
                 xname, xunits = item.get_xaxis() 
-                self.graph.yaxis("Log %s%s^{2}" % (yname,xname),  "%s^{-1}%s^{-2}" % (yunits,xunits))
+                self.graph.yaxis("Log (%s \ \ %s^{2})" % (yname,xname),  "%s^{-1}%s^{-2}" % (yunits,xunits))
             
             if ( self.yLabel =="ln(y*x^(4))"):
@@ -550,5 +556,5 @@
                 yname, yunits = item.get_yaxis()
                 xname, xunits = item.get_xaxis()
-                self.graph.yaxis("Log %s%s^{4}" % (yname,xname),  "%s^{-1}%s^{-4}" % (yunits,xunits))
+                self.graph.yaxis("Log (%s \ \ %s^{4})" % (yname,xname),  "%s^{-1}%s^{-4}" % (yunits,xunits))
             
             if ( self.viewModel == "Guinier lny vs x^(2)"):
Index: guitools/fitDialog.py
===================================================================
--- guitools/fitDialog.py	(revision 2e07e8f34b6f109a7e9a888eeb5cfd0110a98568)
+++ guitools/fitDialog.py	(revision 05da1f8994b512c6a943f61974e1f83b0508cfab)
@@ -9,8 +9,18 @@
 import transform
 
+def format_number(value, high=False):
+    """
+        Return a float in a standardized, human-readable formatted string 
+    """
+    if high:
+        return "%-6.4g" % value
+    else:
+        return "%-5.3g" % value
+
 
 class LinearFit(wx.Dialog):
     def __init__(self, parent, plottable, push_data,transform, id, title):
-        wx.Dialog.__init__(self, parent, id, title, size=(450, 400))
+        wx.Dialog.__init__(self, parent, id, title, size=(400, 380))
+
         """
             Dialog window pops- up when select Linear fit on Context menu
@@ -19,72 +29,102 @@
         self.parent = parent
         self.transform = transform
+        
         #dialog panel self call function to plot the fitting function
         self.push_data = push_data
         #dialog self plottable
-        
         self.plottable = plottable
+        
         # Receive transformations of x and y
         self.xLabel,self.yLabel,self.Avalue,self.Bvalue,\
         self.ErrAvalue,self.ErrBvalue,self.Chivalue= self.transform()
+        
         #Dialog interface
-        panel = wx.Panel(self, -1, style=wx.SIMPLE_BORDER)   
         vbox  = wx.BoxSizer(wx.VERTICAL)
         sizer = wx.GridBagSizer(5,5)
        
-        vbox.Add(panel, 1, wx.EXPAND | wx.ALL)
+        _BOX_WIDTH = 100
  
-        self.tcA = wx.TextCtrl(panel, -1,size=(120,20),style=wx.SIMPLE_BORDER)
-        self.tcErrA = wx.TextCtrl(panel, -1,size=(120,20),style=wx.SIMPLE_BORDER)
-        self.tcB = wx.TextCtrl(panel, -1,size=(120,20),style=wx.SIMPLE_BORDER)
-        self.tcErrB = wx.TextCtrl(panel, -1,size=(120,20),style=wx.SIMPLE_BORDER)
-        self.tcChi = wx.TextCtrl(panel, -1,size=(120,20),style=wx.SIMPLE_BORDER)
-        self.xminFit = wx.TextCtrl(panel,-1,size=(120,20),style=wx.SIMPLE_BORDER)
-        self.xmaxFit = wx.TextCtrl(panel,-1,size=(120,20),style=wx.SIMPLE_BORDER)
-        self.xminTransFit = wx.TextCtrl(panel,-1,size=(120,20),style=wx.SIMPLE_BORDER)
-        self.xmaxTransFit = wx.TextCtrl(panel,-1,size=(120,20),style=wx.SIMPLE_BORDER)
-        self.initXmin = wx.TextCtrl(panel,-1,size=(120,20),style=wx.SIMPLE_BORDER)
-        self.initXmax = wx.TextCtrl(panel,-1,size=(120,20),style=wx.SIMPLE_BORDER)
-        self.btFit =wx.Button(panel,-1,'Fit',size=(120, 30))
-        self.btClose =wx.Button(panel, wx.ID_CANCEL,'Close',size=(90, 30) )
-        self.static_line_1 = wx.StaticLine(panel, -1)
+        self.tcA      = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))
+        self.tcA.SetToolTipString("Fit value for the slope parameter.")
+        self.tcErrA   = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))
+        self.tcErrA.SetToolTipString("Error on the slope parameter.")
+        self.tcB      = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))
+        self.tcA.SetToolTipString("Fit value for the constant parameter.")
+        self.tcErrB   = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))
+        self.tcErrB.SetToolTipString("Error on the constant parameter.")
+        self.tcChi    = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))
+        self.tcChi.SetToolTipString("Chi^2 over degrees of freedom.")
+        self.xminFit  = wx.TextCtrl(self,-1,size=(_BOX_WIDTH,20))
+        self.xminFit.SetToolTipString("Enter the minimum value on the axis to be included in the fit.")
+        self.xmaxFit  = wx.TextCtrl(self,-1,size=(_BOX_WIDTH,20))
+        self.xmaxFit.SetToolTipString("Enter the maximum value on the axis to be included in the fit.")
+        self.xminTransFit = wx.TextCtrl(self,-1,size=(_BOX_WIDTH,20))
+        self.xmaxTransFit = wx.TextCtrl(self,-1,size=(_BOX_WIDTH,20))
+        self.initXmin = wx.TextCtrl(self,-1,size=(_BOX_WIDTH,20))
+        self.initXmax = wx.TextCtrl(self,-1,size=(_BOX_WIDTH,20))
+
+        # Make the info box not editable
+        #_BACKGROUND_COLOR = '#ffdf85'
+        _BACKGROUND_COLOR = self.GetBackgroundColour()
+        self.xminTransFit.SetEditable(False)
+        self.xminTransFit.SetBackgroundColour(_BACKGROUND_COLOR)
+        self.xmaxTransFit.SetEditable(False)
+        self.xmaxTransFit.SetBackgroundColour(_BACKGROUND_COLOR)
+        self.initXmin.SetEditable(False)
+        self.initXmin.SetBackgroundColour(_BACKGROUND_COLOR)
+        self.initXmax.SetEditable(False)
+        self.initXmax.SetBackgroundColour(_BACKGROUND_COLOR)
+        
+        
+        # Buttons on the bottom
+        self.static_line_1 = wx.StaticLine(self, -1)
+        self.btFit =wx.Button(self,-1,'Fit')
+        self.btFit.Bind(wx.EVT_BUTTON, self._onFit)
+        self.btFit.SetToolTipString("Perform fit.")
+        self.btClose =wx.Button(self, wx.ID_CANCEL,'Close')
+        
+        # Intro
+        explanation  = "Perform fit for y(x) = Ax + B"
+        
+        vbox.Add(sizer)
         
         ix = 0
         iy = 1
-        sizer.Add(wx.StaticText(panel, -1, 'y = Ax +B'),(iy, ix),(1,1),\
+        sizer.Add(wx.StaticText(self, -1, explanation),(iy, ix),\
+                 (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        iy += 2
+        sizer.Add(wx.StaticText(self, -1, 'Parameter A'),(iy, ix),\
+                 (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer.Add(self.tcA,(iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        ix += 1
+        sizer.Add(wx.StaticText(self, -1, '+/-'),(iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        ix += 1
+        sizer.Add(self.tcErrA, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        iy += 1
+        ix = 0
+        sizer.Add(wx.StaticText(self, -1, 'Parameter B'),(iy, ix),(1,1),\
                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        iy+=1
-        sizer.Add(wx.StaticText(panel, -1, 'Param A'),(iy, ix),\
-                 (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer.Add(self.tcA,(iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer.Add(wx.StaticText(panel, -1, '+/-'),(iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer.Add(self.tcErrA, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        iy += 1
-        ix = 0
-        sizer.Add(wx.StaticText(panel, -1, 'Param B'),(iy, ix),(1,1),\
+        ix += 1
+        sizer.Add(self.tcB, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        ix += 1
+        sizer.Add(wx.StaticText(self, -1, '+/-'),(iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        ix += 1
+        sizer.Add(self.tcErrB, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        iy += 1
+        ix = 0
+        sizer.Add(wx.StaticText(self, -1, 'Chi2/dof'),(iy, ix),(1,1),\
                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix += 1
-        sizer.Add(self.tcB, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer.Add(wx.StaticText(panel, -1, '+/-'),(iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer.Add(self.tcErrB, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        iy += 1
-        ix = 0
-        sizer.Add(wx.StaticText(panel, -1, 'Chi ^{2}'),(iy, ix),(1,1),\
-                   wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        ix += 1
         sizer.Add(self.tcChi, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        iy += 1
+        iy += 2
         ix = 1
-        sizer.Add(wx.StaticText(panel, -1, 'Xmin'),(iy, ix),(1,1),\
+        sizer.Add(wx.StaticText(self, -1, 'Min'),(iy, ix),(1,1),\
                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0)
         ix += 2
-        sizer.Add(wx.StaticText(panel, -1, 'Xmax'),(iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        iy += 1
-        ix = 0
-        sizer.Add(wx.StaticText(panel, -1, 'Plotted Range'),(iy, ix),(1,1),\
+        sizer.Add(wx.StaticText(self, -1, 'Max'),(iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        iy += 1
+        ix = 0
+        sizer.Add(wx.StaticText(self, -1, 'Plotted Range'),(iy, ix),(1,1),\
                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix +=1
@@ -96,5 +136,5 @@
         iy += 1
         ix = 0
-        sizer.Add(wx.StaticText(panel, -1, 'Fit Range of '+self.xLabel),(iy, ix),(1,1),\
+        sizer.Add(wx.StaticText(self, -1, 'Fit Range of '+self.xLabel),(iy, ix),(1,1),\
                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix += 1
@@ -106,5 +146,5 @@
         iy += 1
         ix = 0
-        sizer.Add(wx.StaticText(panel, -1, 'Fit Range of x'),(iy, ix),(1,1),\
+        sizer.Add(wx.StaticText(self, -1, 'Fit Range of x'),(iy, ix),(1,1),\
                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix += 1
@@ -116,11 +156,18 @@
         ix = 1
         
+        vbox.Add(self.static_line_1, 0, wx.EXPAND, 0)
+        
+        sizer_button = wx.BoxSizer(wx.HORIZONTAL)
+        sizer_button.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        sizer_button.Add(self.btFit, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)
+        sizer_button.Add(self.btClose, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)        
+        vbox.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10)
+        
+        
+        
         sizer.Add(self.btFit, (iy, ix),(1,1), wx.LEFT|wx.ADJUST_MINSIZE, 0)
-        self.btFit.Bind(wx.EVT_BUTTON, self._onFit)
-        ix += 2
-        sizer.Add(self.btClose, (iy, ix),(1,1),\
-                  wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        
-        panel.SetSizer(sizer)
+        
+        
+        #panel.SetSizer(sizer)
         self.SetSizer(vbox)
         self.Centre()
@@ -164,16 +211,13 @@
             self.x,self.y,self.dx,self.dy= self.plottable.returnValuesOfView()
             
-            self.xminTransFit.SetLabel(str(min(self.x)))
-            self.xmaxTransFit.SetLabel(str(max(self.x)))
-            self.xminTransFit.Disable()
-            self.xmaxTransFit.Disable()
-            
-            self.initXmin.SetValue(str(self.mini))
-            self.initXmax.SetValue(str(self.maxi))
-            self.initXmin.Disable()
-            self.initXmax.Disable()
-            
-            self.xminFit.SetLabel(str(self.mini))
-            self.xmaxFit.SetLabel(str(self.maxi))
+            
+            self.xminTransFit.SetLabel(format_number(min(self.x)))
+            self.xmaxTransFit.SetLabel(format_number(max(self.x)))
+            
+            self.initXmin.SetValue(format_number(self.mini))
+            self.initXmax.SetValue(format_number(self.maxi))
+            
+            self.xminFit.SetLabel(format_number(self.mini))
+            self.xmaxFit.SetLabel(format_number(self.maxi))
         
       
@@ -203,11 +247,9 @@
                 xmaxView=self.floatTransform(xmax)
                 if (self.xLabel=="log10(x)"):
-                    self.xminTransFit.SetValue(str(math.log10(xminView)))
-                    self.xmaxTransFit.SetValue(str(math.log10(xmaxView)))
-                else:
-                    self.xminTransFit.SetValue(str(xminView))
-                    self.xmaxTransFit.SetValue(str(xmaxView))
-                self.xminTransFit.Disable()
-                self.xmaxTransFit.Disable()
+                    self.xminTransFit.SetValue(format_number(math.log10(xminView)))
+                    self.xmaxTransFit.SetValue(format_number(math.log10(xmaxView)))
+                else:
+                    self.xminTransFit.SetValue(format_number(xminView))
+                    self.xmaxTransFit.SetValue(format_number(xmaxView))
                 # Store the transformed values of view x, y,dy in variables  before the fit
                 if  self.yLabel.lower() == "log10(y)":
@@ -240,5 +282,9 @@
                     chisqr, out, cov = fittings.sansfit(self.model, 
                                 [self.cstA, self.cstB],tempx, tempy,tempdy,xminView,xmaxView)
-                #print "this out",out
+                
+                # Use chi2/dof
+                if len(tempx)>0:
+                    chisqr = chisqr/len(tempx)
+                
                 #Check that cov and out are iterable before displaying them
                 if cov ==None:
@@ -305,9 +351,9 @@
               Display  the value on fit Dialog 
          """
-         self.tcA.SetValue(str(cstA))
-         self.tcB.SetValue(str(cstB))
-         self.tcErrA.SetValue(str(errA))
-         self.tcErrB.SetValue(str(errB))
-         self.tcChi.SetValue(str(Chi))
+         self.tcA.SetValue(format_number(cstA))
+         self.tcB.SetValue(format_number(cstB))
+         self.tcErrA.SetValue(format_number(errA))
+         self.tcErrB.SetValue(format_number(errB))
+         self.tcChi.SetValue(format_number(Chi))
         
     def _ongetValues(self):
@@ -325,12 +371,12 @@
         if float(usermin) < float(usermax):
             if float(usermin) >= float(self.mini) and float(usermin) < float(self.maxi):
-                self.xminFit.SetValue(str(usermin))
+                self.xminFit.SetValue(format_number(float(usermin)))
             else:
-                self.xminFit.SetValue(str(self.mini))
+                self.xminFit.SetValue(format_number(float(self.mini)))
                 
             if float(usermax) > float(self.mini) and float(usermax) <= float(self.maxi):
-                self.xmaxFit.SetLabel(str(usermax))
+                self.xmaxFit.SetLabel(format_number(float(usermax)))
             else:
-                self.xmaxFit.SetLabel(str(self.maxi))
+                self.xmaxFit.SetLabel(format_number(float(self.maxi)))
                 
             mini =float(self.xminFit.GetValue())
@@ -377,15 +423,30 @@
             Set fit parameters
         """
-        self.xminFit.SetValue(str(xmin))
-        self.xmaxFit.SetValue(str(xmax))
-        self.xminTransFit.SetValue(str(xminTrans))
-        self.xmaxTransFit.SetValue(str(xmaxTrans))
-        
-   
-if __name__ == "__main__": 
-    app = wx.App()
-    dialog=LinearFit(None, -1, 'Fitting')
-    dialog.ShowModal()
+        self.xminFit.SetValue(format_number(xmin))
+        self.xmaxFit.SetValue(format_number(xmax))
+        self.xminTransFit.SetValue(format_number(xminTrans))
+        self.xmaxTransFit.SetValue(format_number(xmaxTrans))
+        
+  
+class MyApp(wx.App):
+    def OnInit(self):
+        wx.InitAllImageHandlers()
+        plot = Theory1D([],[])
+        dialog = LinearFit(None, plot, self.onFitDisplay,self.returnTrans, -1, 'Linear Fit')
+        if dialog.ShowModal() == wx.ID_OK:
+            pass
+        dialog.Destroy()
+        
+        return 1
+    
+    def onFitDisplay(self, tempx,tempy,xminView,xmaxView,xmin,xmax,func):
+        pass
+        
+    def returnTrans(self):
+        return '','',0,0,0,0,0
+
+# end of class MyApp
+
+if __name__ == "__main__":
+    app = MyApp(0)
     app.MainLoop()
-
-
Index: guitools/plottables.py
===================================================================
--- guitools/plottables.py	(revision b43a00952d61f7d74e84e0fd6420c550eadbfaab)
+++ guitools/plottables.py	(revision 05da1f8994b512c6a943f61974e1f83b0508cfab)
@@ -710,6 +710,6 @@
         self.dx = dx
         self.dy = dy
-        self.xaxis( 'q', 'A')
-        self.yaxis( 'intensity', 'cm')
+        self.xaxis( '', '')
+        self.yaxis( '', '')
         self.view = self.View(self.x, self.y, self.dx, self.dy)
         
@@ -744,6 +744,6 @@
         self.y = y
         self.dy = dy
-        self.xaxis( 'q', 'A')
-        self.yaxis( 'intensity', 'cm')
+        self.xaxis( '', '')
+        self.yaxis( '', '')
         self.view = self.View(self.x, self.y, None, self.dy)
         
Index: guitools/requirements.txt
===================================================================
--- guitools/requirements.txt	(revision 88e7d08bfb20e8fbcacbf62a0bdf9c31199d171b)
+++ guitools/requirements.txt	(revision 05da1f8994b512c6a943f61974e1f83b0508cfab)
@@ -104,2 +104,15 @@
 	ALINA
  1- Would like to change the y axis label display
+ 
+ 
+Cleaning up for deployment:
+
+ - When zooming, check that the new lower bound is positive if on a log scale [DONE] 
+ - Fixed bug with the zooming dependency on scale [DONE]
+ - Improved look of Fit dialog [DONE]
+ 
+ - Improve labels
+ 
+ - Problem scales:
+     - x vs 1/y
+     
Index: guitools/transform.py
===================================================================
--- guitools/transform.py	(revision 2e07e8f34b6f109a7e9a888eeb5cfd0110a98568)
+++ guitools/transform.py	(revision 05da1f8994b512c6a943f61974e1f83b0508cfab)
@@ -27,4 +27,5 @@
      else:
          return math.sqrt(x)
+     
 def toLogX(x,y=None):
     """
@@ -43,10 +44,10 @@
     else:
         raise ValueError,"cannot divide by zero"
+    
 def toOneOverSqrtX(y , x=None):
-    if y!=None:
-        if y > 0:
-            return 1/math.sqrt(y)
-        else:
-            raise ValueError,"cannot be computed"
+    if y > 0:
+        return 1/math.sqrt(y)
+    else:
+        raise ValueError,"transform.toOneOverSqrtX: cannot be computed"
     
     
@@ -55,5 +56,5 @@
         return math.log(y*(x**2))
     else:
-         raise ValueError,"cannot be computed"
+         raise ValueError,"transform.toLogYX2: cannot be computed"
      
 
@@ -61,4 +62,6 @@
     if math.pow(x,4)*y > 0:
         return math.log(math.pow(x,4)*y)
+    else:
+         raise ValueError,"transform.toLogYX4: input error"
 
 def toLogXY(y,x):
@@ -94,9 +97,8 @@
     if  dx != None:
         err = 2*x*dx
-        if math.fabs(err) >= math.fabs(x):
-            err = 0.9*x
         return math.fabs(err)
     else:
         return 0.0
+    
 def errFromX2(x,y=None,dx=None,dy=None):
     """
@@ -110,10 +112,8 @@
         else:
             err = 0
-        if math.fabs(err) >= math.fabs(x):
-            err = 0.9*x    
-    else:
-        err = 0.9*x
-       
         return math.fabs(err)
+    else:
+        raise ValueError, "transform.errFromX2: can't compute error of negative x"
+    
 def errToLog10X(x,y=None,dx=None,dy=None):
     """
@@ -129,7 +129,4 @@
         raise ValueError, "errToLogX: divide by zero"
     
-    if math.fabs(dx) >= math.fabs(x):
-        dx = 0.9*x
-    
     return dx
     
@@ -146,7 +143,4 @@
     else:
         raise ValueError, "errToLogX: divide by zero"
-    
-    if math.fabs(dx) >= math.fabs(x):
-        dx = 0.9*x
     
     return dx
@@ -160,6 +154,4 @@
         dy=0
     err =math.sqrt((2*x*y*dx)**2 +((x**2)*dy)**2)
-    #if err >= math.fabs(x):
-    #    err =0.9*x
     return err 
     
@@ -174,6 +166,4 @@
             dy = 0
         err = (dx/x)**2 + (dy/y)**2
-        #if  math.sqrt(math.fabs(err)) >= math.fabs(x):
-        #    err= 0.9*x
     else:
         raise ValueError, "cannot compute this error"
@@ -190,7 +180,5 @@
         if (dy == None):
             dy = 0
-        err = (2*dx/x)**2 + (dy/y)**2
-        #if math.fabs(err) >= math.fabs(x):
-        #   err =0.9*x
+        err = (2.0*dx/x)**2 + (dy/y)**2
     else:
          raise ValueError, "cannot compute this error"
@@ -205,10 +193,8 @@
         if dx ==None:
             dx= 0
-        err = -(dx)**2/x**2
+        err = dx/x**2
     else:
         raise ValueError,"Cannot compute this error"
     
-    if math.fabs(err)>= math.fabs(x):
-        err= 0.9*x
     return math.fabs(err)
 
@@ -220,11 +206,10 @@
         if dx==None:
             dx =0
-        err= -1/2*math.pow(x, -3/2)* dx
-        #if math.fabs(err)>= math.fabs(x):
-        #    err=0.9*x
+        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):
     """
@@ -236,7 +221,5 @@
     if dy==None:
         dy=0
-    err =math.sqrt((4*dx/x)**2 +(dy/y)**2)
-    #if err >= math.fabs(x):
-    #err =0.9*x
+    err =math.sqrt((4.0*dx/x)**2 +(dy/y)**2)
     return err 
 
