Index: guitools/PlotPanel.py
===================================================================
--- guitools/PlotPanel.py	(revision 52b1f77b9587273e72c19ecf88a3e5f2a75af750)
+++ guitools/PlotPanel.py	(revision e2914b14919b7507085cdb12782a84ad78e53105)
@@ -60,13 +60,23 @@
         self.xscales =""
         self.yscales =""
-        # keep track if the previous transformation
-        self.prevXtrans ="x"
-        self.prevYtrans ="Log(y)"
+        # keep track if the previous transformation of x and y in Property dialog
+        self.prevXtrans =" "
+        self.prevYtrans =" "
+        
+    def setTrans(self,xtrans,ytrans): 
+        """
+            @param xtrans: set x transformation on Property dialog
+            @param ytrans: set y transformation on Property dialog
+        """
+        self.prevXtrans =xtrans
+        self.prevYtrans =ytrans
         
     def onFitting(self, event): 
+        """
+            when clicking on linear Fit on context menu , display Fitting Dialog
+        """
         list =[]
         list = self.graph.returnPlottable()
         from fitDialog import LinearFit
-        
         print len(list)
         if len(list.keys())>0:
@@ -77,7 +87,11 @@
 
     def _onProperties(self, event):
-       
+        """
+            when clicking on Properties on context menu ,The Property dialog is displayed
+            The user selects a transformation for x or y value and a new plot is displayed
+        """
         from PropertyDialog import Properties
         dial = Properties(self, -1, 'Properties')
+        dial.setValues( self.prevXtrans, self.prevYtrans )
         if dial.ShowModal() == wx.ID_OK:
             self.xscales, self.yscales = dial.getValues()
@@ -86,56 +100,75 @@
             
     def toX(self,x):
+        """
+            This function is used to load value on Plottable.View
+            @param x: Float value
+            @return x,
+        """
         return x
     
     def toX2(self,x):
         """
+            This function is used to load value on Plottable.View
             Calculate x^(2)
             @param x: float value
         """
         return math.pow(x,2)
+    
     def fromX2(self,x):
          """
+             This function is used to load value on Plottable.View
             Calculate square root of x
             @param x: float value
          """
-         if x >=0 :
+         if not x >=0 :
+             raise ValueError, "square root of a negative value "
+         else:
              return math.sqrt(x)
-         else:
-            return 0
-    def toLogXY(self,x):
-        """
+         
+    def toLogXY(self,x,y):
+        """
+            This function is used to load value on Plottable.View
             calculate log x
             @param x: float value
         """
-        if x > 0:
-            return math.log(x)
+        if not x*y > 0:
+            raise ValueError, "Log(X*Y)of a negative value "
         else:
-            return 0
+            return math.log(x*y)
+        
     def fromLogXY(self,x):
         """
+            This function is used to load value on Plottable.View
             Calculate e^(x)
             @param x: float value
         """
-        if x.__class__.__name__ == 'list':
-            temp =[]
-            for x_i in x:
-                temp.append(math.exp(x_i))
-            return temp
-        else:
-            return math.exp(x)
-    
-
+        return math.exp(x*y)
+    
     def set_yscale(self, scale='linear'):
+        """
+            Set the scale on Y-axis
+            @param scale: the scale of y-axis
+        """
         self.subplot.set_yscale(scale)
         self.yscale = scale
         
     def get_yscale(self):
+        """
+             @return: Y-axis scale
+        """
         return self.yscale
     
     def set_xscale(self, scale='linear'):
+        """
+            Set the scale on x-axis
+            @param scale: the scale of x-axis
+        """
         self.subplot.set_xscale(scale)
         self.xscale = scale
-        
+       
     def get_xscale(self):
+        """
+             @return: x-axis scale
+        """
         return self.xscale
 
@@ -338,7 +371,7 @@
             if ( self.xscales=="x" ):
                 if self.prevXtrans == "x^(2)":
-                    item.transform_x(  self.fromX2, self.errFunc )
+                    item.transform_x(  self.fromX2, self.errFuncfromX2 )
                 #elif self.prevXtrans == "Log(x)"
-                    #item.transform_x(  self.fromLogXY,self.errFunc )
+                    #item.transform_x(  self.fromLogXY,self.errFuncfromX2 )
                 print "Values of  x",item.x[0:5]
                 print "Values of view x",item.view.x[0:5]
@@ -350,5 +383,5 @@
                     #item.transform_x(  self.fromLogXY, self.errFunc )
                 if  self.prevXtrans != "x^(2)":
-                    item.transform_x(  self.toX2, self.errFunc )
+                    item.transform_x(  self.toX2, self.errFuncToX2 )
                     print "Values of  x",item.x[0:5]
                     print "Values of view x^(2)",item.view.x[0:5]
@@ -358,5 +391,5 @@
             if (self.xscales=="Log(x)" ):
                 if self.prevXtrans == "x^(2)":
-                    item.transform_x(  self.fromX2, self.errFunc )
+                    item.transform_x(  self.fromX2, self.errFuncfromX2 )
                 #elif self.prevXtrans == "Log(x)":
                     #item.transform_x(  self.toLogXY, self.errFunc )
@@ -367,5 +400,5 @@
             if ( self.yscales=="y" ):
                 if self.prevYtrans == "y^(2)":
-                    item.transform_y(  self.toX2, self.errFunc )
+                    item.transform_y(  self.toX2, self.errFuncToX2 )
                 #elif self.prevXtrans == "Log(y)"
                     #item.transform_y(  self.fromLogXY.errFunc )   
@@ -375,5 +408,5 @@
             if ( self.yscales=="Log(y)" ):
                 if self.prevYtrans == "y^(2)":
-                     item.transform_y(  self.fromX2, self.errFunc )
+                     item.transform_y(  self.fromX2, self.errFuncfromX2 )
                 #elif self.prevYtrans != "Log(y)":
                     #item.transform_y(  self.toLogXY, self.errFunc )
@@ -386,5 +419,5 @@
                        #item.transform_y(  self.fromLogXY, self.errFunc )
                 if self.prevYtrans != "y^(2)":
-                     item.transform_y(  self.toX2, self.errFunc )   
+                     item.transform_y(  self.toX2, self.errFuncToX2 )   
                 self.set_yscale("linear")
                 self.graph.yaxis("\\rm{Intensity^{2}} ","cm^{-2}")
@@ -397,16 +430,61 @@
         self.subplot.figure.canvas.draw_idle()
         
-    def errFunc(self,x):
-        """
-            calculate log x
-            @param x: float value
-        """
-        if x >=0:
-            return math.sqrt(x)
+    def errFuncToX2(self,x,dx=None):
+        """
+            calculate error of x**2
+            @param x: float value
+            @param dx: float value
+        """
+        if not dx == None:
+            return 2*x*dx
         else:
-            return 0
-   
-                
+            raise ValueError, "Can't  calculate the error"
+    def errFuncfromX2(self,x,dx=None):
+        """
+            calculate error of sqrt(x)
+            @param x: float value
+            @param dx: float value
+        """
+        if (x > 0) and (dx != None):
+            err= dx/2*math.sqrt(x)
+            
+        else:
+            raise ValueError, "Can't  calculate the error"
+    def errFuncToLogX(self,x,dx=None):
+        """
+            calculate error of Log(xy)
+            @param x: float value
+            @param dx: float value
+        """
+        if (x!=0) and ( dx != None):
+            err= dx/x
+            if err >= x:
+                err = 0.9*x
+            return err
+        elif x==0:
+            raise ValueError, "On calculate error: Can't divide by zero"
+        else:
+            raise ValueError, "Can't  calculate the error"
+        
+    def errFuncfromLogXY(self,x,dx=None):
+        """
+            calculate error of sqrt(x)
+            @param x: float value
+            @param dx: float value
+        """
+        if (x > 0) and (dx != None):
+            err= dx/2*math.sqrt(x)
+            if err >= x:
+                err = 0.9*x
+            return err
+        else:
+            raise ValueError, "Can't  calculate the error"
+                   
     def onFitDisplay(self, plottable):
+        """
+            Add a new plottable into the graph .In this case this plottable will be used 
+            to fit some data
+            @param plottable: the plottable to plot
+        """
         self.graph.add(plottable)
         self.graph.render(self)
Index: guitools/PropertyDialog.py
===================================================================
--- guitools/PropertyDialog.py	(revision 6cfe7031360bc5d65e5f82097116559ef04e5349)
+++ guitools/PropertyDialog.py	(revision e2914b14919b7507085cdb12782a84ad78e53105)
@@ -62,5 +62,4 @@
         return  self.xvalue.SetValue(x),  self.yvalue.SetValue(y)
         
-        
     def getValues(self):
         return self.xvalue.GetValue(), self.yvalue.GetValue()
Index: guitools/plottables.py
===================================================================
--- guitools/plottables.py	(revision f79b054a140dadd71d23a317242535674d63e389)
+++ guitools/plottables.py	(revision e2914b14919b7507085cdb12782a84ad78e53105)
@@ -339,6 +339,5 @@
         self.x= x
         self.y = y
-        self.dx= x
-        self.dy = y
+        
         self.reset_view()
         
