Index: guitools/PlotPanel.py
===================================================================
--- guitools/PlotPanel.py	(revision dfca3deaf6000f58850fbf6bf72b7bda8744bdb3)
+++ guitools/PlotPanel.py	(revision 8e44d5153890d0bd38a1633199c6a64a7f6211b5)
@@ -389,6 +389,6 @@
                 self.graph.yaxis("%s%s" % (yname,xname),  "%s^{-1}%s^{-1}" % (yunits,xunits))
                 
-            if ( self.yscales =="ln(y*x^(2)"):
-                item.transform_y( transform.toYX2 ,transform.ToYX2 )
+            if ( self.yscales =="ln(y*x^(2))"):
+                item.transform_y( transform.toYX2 ,transform.errToLogYX2 )
                 self.set_yscale("linear")
                 yname, yunits = item.get_yaxis()
Index: guitools/fitDialog.py
===================================================================
--- guitools/fitDialog.py	(revision 3aa70743e169bfeb65ca5aa7a0523941acbeb8d9)
+++ guitools/fitDialog.py	(revision 8e44d5153890d0bd38a1633199c6a64a7f6211b5)
@@ -43,10 +43,9 @@
         self.btClose =wx.Button(panel, wx.ID_CANCEL,'Close',size=(90, 30) )
         self.static_line_1 = wx.StaticLine(panel, -1)
+        
         ix = 0
         iy = 1
-        
         sizer.Add(wx.StaticText(panel, -1, 'y = Ax +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),\
@@ -58,5 +57,4 @@
         ix += 1
         sizer.Add(self.tcErrA, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-       
         iy += 1
         ix = 0
@@ -108,12 +106,11 @@
                   wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0)
         
-       
         panel.SetSizer(sizer)
         self.SetSizer(vbox)
         self.Centre()
+        
         # Receives the type of model for the fitting
         from LineModel import LineModel
         self.model  = LineModel()
-          
           
         #Display the fittings values
@@ -139,6 +136,5 @@
             self.PXmin.Disable()
             self.PXmax.Disable()
-       
-        
+    
         # new data for the fit 
         self.file_data1 = Theory1D(x=[], y=[], dy=None)
@@ -158,5 +154,4 @@
         #Check if the field of Fit Dialog contain values and use the x max and min of the user
         xmin,xmax = self._checkVal(self.FXmin.GetValue(),self.FXmax.GetValue())
-       
         #store the values of View in x,y, dx,dy
         x,y,dx,dy=self.plottable.returnValuesOfView()
@@ -167,5 +162,4 @@
         # makes transformation for y as a line to fit
         if x != []: 
-            
             xminView=self.floatTransform(xmin)
             xmaxView=self.floatTransform(xmax)
@@ -190,6 +184,4 @@
                    
             #Find the fitting parameters
-            print "X", tempx
-            print "Y", tempy
             chisqr, out, cov = fittings.sansfit(self.model, 
                             [self.cstA, self.cstB],tempx, tempy,tempdy,xminView,xmaxView)
@@ -211,5 +203,5 @@
             self.model.setParam('A', float(cstA))
             self.model.setParam('B', float(cstB))
-            print "this is constant A:",float(cstA)
+            
             tempx = []
             tempy = []
@@ -241,8 +233,5 @@
             else: 
                 tempy.append(y_model)
-                
-            
-            print "this max",xmax
-            print "this view xmax", xmaxView
+          
             # Create new data plottable with result
             self.file_data1.x =[] 
@@ -252,6 +241,4 @@
             self.file_data1.dx=None
             self.file_data1.dy=None
-            print "this is the min of data1",min(self.file_data1.x )
-            print "this is the max of data1",max(self.file_data1.x )
             #Load the view with the new values
             self.file_data1.reset_view()
Index: guitools/plottables.py
===================================================================
--- guitools/plottables.py	(revision 831149e3d5d221f9048a09e588830a2ed3c9141c)
+++ guitools/plottables.py	(revision 8e44d5153890d0bd38a1633199c6a64a7f6211b5)
@@ -40,4 +40,7 @@
 
 # Support for ancient python versions
+import copy
+import numpy
+
 if 'any' not in dir(__builtins__):
     def any(L):
@@ -434,6 +437,5 @@
                 @param errfunc: function to apply to errors
             """
-            import copy
-            import numpy
+            
             
             # Sanity check
@@ -483,6 +485,4 @@
                 @param errfunc: function to apply to errors dy
             """
-            import copy
-            import numpy
             # Sanity check
             has_x = False
@@ -589,4 +589,5 @@
     def changed(self):
         return False
+    
     @classmethod
     def labels(cls, collection):
@@ -598,6 +599,5 @@
         return map
    
-
-
+   
 class Fit1D(Plottable):
     """Fit plottable: composed of a data line plus a theory line.  This
Index: guitools/transform.py
===================================================================
--- guitools/transform.py	(revision 831149e3d5d221f9048a09e588830a2ed3c9141c)
+++ guitools/transform.py	(revision 8e44d5153890d0bd38a1633199c6a64a7f6211b5)
@@ -83,17 +83,5 @@
     else:
         return math.log(x*y)
-def errToLogYX4(x,y=None,dx=None,dy=None):
-    """
-        error for ln(y*x^(4))
-        @param x: float value
-    """
-    if dx==None:
-        dx=0
-    if dy==None:
-        dy=0
-    err =math.sqrt((4*dx/x)**2 +(dy/y)**2)
-    if err >= math.fabs(x):
-        err =0.9*x
-    return err 
+
 def fromLogXY(self,x):
     """
@@ -204,5 +192,5 @@
         if (dy == None):
             dy = 0
-        err = 4*(dx**2)/(x**2) + (dy**2)/(y**2)
+        err = (2*dx/x)**2 + (dy/y)**2
         if math.fabs(err) >= math.fabs(x):
             err =0.9*x
@@ -241,4 +229,17 @@
     
     return math.fabs(err)
+def errToLogYX4(x,y=None,dx=None,dy=None):
+    """
+        error for ln(y*x^(4))
+        @param x: float value
+    """
+    if dx==None:
+        dx=0
+    if dy==None:
+        dy=0
+    err =math.sqrt((4*dx/x)**2 +(dy/y)**2)
+    if err >= math.fabs(x):
+        err =0.9*x
+    return err 
 
            
