Index: guitools/PlotPanel.py
===================================================================
--- guitools/PlotPanel.py	(revision 150c04a24a22c547a7794c40bfb8d089fe3ff50b)
+++ guitools/PlotPanel.py	(revision b43a00952d61f7d74e84e0fd6420c550eadbfaab)
@@ -116,6 +116,6 @@
         self.symbollist = ['o','x','^','v','<','>','+','s','d','D','h','H','p']
         #User scale
-        self.xscales ="x"
-        self.yscales ="log10(y)"
+        self.xLabel ="x"
+        self.yLabel ="log10(y)"
         self.viewModel ="--"
         # keep track if the previous transformation of x and y in Property dialog
@@ -128,8 +128,25 @@
         #self.fit_result = Data1D(x=[], y=[],dx=None, dy=None)
         self.fit_result.name = "Fit"
+        # For fit Dialog initial display
         self.xmin=0.0
         self.xmax=0.0
         self.xminView=0.0
         self.xmaxView=0.0
+        self.Avalue=None
+        self.Bvalue=None
+        self.ErrAvalue=None
+        self.ErrBvalue=None
+        self.Chivalue=None
+    def resetFitView(self):
+        # For fit Dialog initial display
+        self.xmin=0.0
+        self.xmax=0.0
+        self.xminView=0.0
+        self.xmaxView=0.0
+        self.Avalue=None
+        self.Bvalue=None
+        self.ErrAvalue=None
+        self.ErrBvalue=None
+        self.Chivalue=None
     def onWheel(self, event):
         """
@@ -175,5 +192,6 @@
 
     def returnTrans(self):
-        return self.xscales,self.yscales
+        return self.xLabel,self.yLabel, self.Avalue, self.Bvalue,\
+        self.ErrAvalue,self.ErrBvalue,self.Chivalue
     
     def setTrans(self,xtrans,ytrans): 
@@ -196,4 +214,5 @@
             first_item = list.keys()[0]
             dlg = LinearFit( None, first_item, self.onFitDisplay,self.returnTrans, -1, 'Fitting')
+           
             if (self.xmin !=0.0 )and ( self.xmax !=0.0)\
                 and(self.xminView !=0.0 )and ( self.xmaxView !=0.0):
@@ -215,10 +234,10 @@
                 dial.setValues( self.prevXtrans, self.prevYtrans,self.viewModel )
                 if dial.ShowModal() == wx.ID_OK:
-                    self.xscales, self.yscales,self.viewModel = dial.getValues()
+                    self.xLabel, self.yLabel,self.viewModel = dial.getValues()
                     if self.viewModel =="Guinier lny vs x^(2)":
-                        self.xscales="x^(2)"
-                        self.yscales="ln(y)"
+                        self.xLabel="x^(2)"
+                        self.yLabel="ln(y)"
                         self.viewModel = "--"
-                        dial.setValues( self.xscales, self.yscales,self.viewModel )
+                        dial.setValues( self.xLabel, self.yLabel,self.viewModel )
                     self._onEVT_FUNC_PROPERTY()
                 dial.Destroy()
@@ -456,61 +475,61 @@
         
         for item in list:
-            item.getTransform(self.xscales,self.yscales)
-            if ( self.xscales=="x" ):
-                item.returnTransformationx(transform.toX,transform.errToX)
+            item.setLabel(self.xLabel,self.yLabel)
+            if ( self.xLabel=="x" ):
+                item.transformX(transform.toX,transform.errToX)
                 self.set_xscale("linear")
                 name, units = item.get_xaxis()
                 self.graph.xaxis("%s" % name,  "%s^{-1}" % units)
                 
-            if ( self.xscales=="x^(2)" ):
-                item.returnTransformationx(transform.toX2,transform.errToX2)
+            if ( self.xLabel=="x^(2)" ):
+                item.transformX(transform.toX2,transform.errToX2)
                 self.set_xscale('linear')
                 name, units = item.get_xaxis()
                 self.graph.xaxis("%s^{2}" % name,  "%s^{-2}" % units)
                 
-            if (self.xscales=="log10(x)" ):
-                item.returnTransformationx(transform.toX,transform.errToX)
+            if (self.xLabel=="log10(x)" ):
+                item.transformX(transform.toX,transform.errToX)
                 self.set_xscale("log")
                 name, units = item.get_xaxis() 
                 self.graph.xaxis("\log_{10}\ \  %s" % name,  "%s^{-1}" % units)
                 
-            if ( self.yscales=="ln(y)" ):
-                item.returnTransformationy(transform.toLogX,transform.errToLogX)
+            if ( self.yLabel=="ln(y)" ):
+                item.transformY(transform.toLogX,transform.errToLogX)
                 self.set_yscale("linear")
                 name, units = item.get_yaxis()
                 self.graph.yaxis("log\ \ %s" % name,  "%s^{-1}" % units)
                 
-            if ( self.yscales=="y" ):
-                item.returnTransformationy(transform.toX,transform.errToX)
+            if ( self.yLabel=="y" ):
+                item.transformY(transform.toX,transform.errToX)
                 self.set_yscale("linear")
                 name, units = item.get_yaxis()
                 self.graph.yaxis("%s" % name,  "%s^{-1}" % units)
                 
-            if ( self.yscales=="log10(y)" ): 
-                item.returnTransformationy(transform.toX,transform.errToX)
+            if ( self.yLabel=="log10(y)" ): 
+                item.transformY(transform.toX,transform.errToX)
                 self.set_yscale("log")  
                 name, units = item.get_yaxis()
                 self.graph.yaxis("\log_{10}\ \ %s" % name,  "%s^{-1}" % units)
                 
-            if ( self.yscales=="y^(2)" ):
-                item.returnTransformationy( transform.toX2,transform.errToX2 )    
+            if ( self.yLabel=="y^(2)" ):
+                item.transformY( transform.toX2,transform.errToX2 )    
                 self.set_yscale("linear")
                 name, units = item.get_yaxis()
                 self.graph.yaxis("%s^{2}" % name,  "%s^{-2}" % units)
                 
-            if ( self.yscales =="1/y"):
-                item.returnTransformationy(transform.toOneOverX,transform.errOneOverX )
+            if ( self.yLabel =="1/y"):
+                item.transformY(transform.toOneOverX,transform.errOneOverX )
                 self.set_yscale("linear")
                 name, units = item.get_yaxis()
                 self.graph.yaxis("%s" % name,  "\ \%s" % units)
                 
-            if ( self.yscales =="1/sqrt(y)" ):
-                item.returnTransformationy(transform.toOneOverSqrtX,transform.errOneOverSqrtX )
+            if ( self.yLabel =="1/sqrt(y)" ):
+                item.transformY(transform.toOneOverSqrtX,transform.errOneOverSqrtX )
                 self.set_yscale("linear")
                 name, units = item.get_yaxis()
                 self.graph.yaxis("\sqrt{%s}" %name,  "%s" % units)
                 
-            if ( self.yscales =="ln(y*x)"):
-                item.returnTransformationy( transform.toLogXY,transform.errToLogXY)
+            if ( self.yLabel =="ln(y*x)"):
+                item.transformY( transform.toLogXY,transform.errToLogXY)
                 self.set_yscale("linear")
                 yname, yunits = item.get_yaxis()
@@ -518,6 +537,6 @@
                 self.graph.yaxis("log\ %s %s" % (yname,xname),  "%s^{-1}%s^{-1}" % (yunits,xunits))
                 
-            if ( self.yscales =="ln(y*x^(2))"):
-                item.returnTransformationy( transform.toLogYX2,transform.errToLogYX2)
+            if ( self.yLabel =="ln(y*x^(2))"):
+                item.transformY( transform.toLogYX2,transform.errToLogYX2)
                 self.set_yscale("linear")
                 yname, yunits = item.get_yaxis()
@@ -525,6 +544,6 @@
                 self.graph.yaxis("Log %s%s^{2}" % (yname,xname),  "%s^{-1}%s^{-2}" % (yunits,xunits))
             
-            if ( self.yscales =="ln(y*x^(4))"):
-                item.returnTransformationy(transform.toLogYX4,transform.errToLogYX4)
+            if ( self.yLabel =="ln(y*x^(4))"):
+                item.transformY(transform.toLogYX4,transform.errToLogYX4)
                 self.set_yscale("linear")
                 yname, yunits = item.get_yaxis()
@@ -533,24 +552,28 @@
             
             if ( self.viewModel == "Guinier lny vs x^(2)"):
-                item.returnTransformationx(transform.toX2,transform.errToX2)
+                
+                item.transformX(transform.toX2,transform.errToX2)
                 self.set_xscale('linear')
                 name, units = item.get_xaxis()
                 self.graph.xaxis("%s^{2}" % name,  "%s^{-2}" % units)
-                item.returnTransformationy(transform.toLogX,transform.errToLogX )
+                
+                item.transformY(transform.toLogX,transform.errToLogX )
                 self.set_yscale("linear")
                 name, units = item.get_yaxis()
                 self.graph.yaxis("$Log %s$" % name,  "%s^{-1}" % units)
+                
             item.transformView()
-        #item.name = self.yscales+" vs " +self.xscales  
+            
+        #item.name = self.yLabel+" vs " +self.xLabel  
         self.xmin=0.0
         self.xmax=0.0
         self.xminView=0.0
         self.xmaxView=0.0    
-        self.prevXtrans = self.xscales 
-        self.prevYtrans = self.yscales  
+        self.prevXtrans = self.xLabel 
+        self.prevYtrans = self.yLabel  
         self.graph.render(self)
         self.subplot.figure.canvas.draw_idle()
         
-    def onFitDisplay(self, tempx,tempy,xminView,xmaxView,xmin,xmax):
+    def onFitDisplay(self, tempx,tempy,xminView,xmaxView,xmin,xmax,func):
         """
             Add a new plottable into the graph .In this case this plottable will be used 
@@ -558,5 +581,5 @@
             @param plottable: the plottable to plot
         """
-        
+        self.Avalue,self.Bvalue,self.ErrAvalue,self.ErrBvalue,self.Chivalue=func
         
         list =[]
Index: guitools/fitDialog.py
===================================================================
--- guitools/fitDialog.py	(revision 416223d9568a1d580f938f2e229d490e7c0b1980)
+++ guitools/fitDialog.py	(revision b43a00952d61f7d74e84e0fd6420c550eadbfaab)
@@ -11,9 +11,9 @@
 
 class LinearFit(wx.Dialog):
-    #def __init__(self, parent, id, title):
     def __init__(self, parent, plottable, push_data,transform, id, title):
         wx.Dialog.__init__(self, parent, id, title, size=(450, 400))
         """
-            for the fit window
+            Dialog window pops- up when select Linear fit on Context menu
+            Displays fitting parameters
         """
         self.parent = parent
@@ -22,7 +22,9 @@
         self.push_data = push_data
         #dialog self plottable
+        
         self.plottable = plottable
         # Receive transformations of x and y
-        self.xtrans,self.ytrans= self.transform()
+        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)   
@@ -91,11 +93,8 @@
         ix += 2
         sizer.Add(self.PXmax, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        iy += 1
-        ix = 1
-        sizer.Add(wx.StaticText(panel, -1,"x transofrmation is: "+self.xtrans ),(iy, ix),(1,1),\
-                   wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        iy += 1
-        ix = 0
-        sizer.Add(wx.StaticText(panel, -1, 'Fit Range'),(iy, ix),(1,1),\
+       
+        iy += 1
+        ix = 0
+        sizer.Add(wx.StaticText(panel, -1, 'Fit Range of '+self.xLabel),(iy, ix),(1,1),\
                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix += 1
@@ -138,10 +137,25 @@
         
         # Set default value of parameter in fit dialog
-        self.tcA.SetLabel(str(self.default_A))
-        self.tcB.SetLabel(str(self.default_B))
-        self.tcErrA.SetLabel(str(0.0))
-        self.tcErrB.SetLabel(str(0.0))
-        self.tcChi.SetLabel(str(0.0))
-        
+        
+        if self.Avalue==None:
+            self.tcA.SetLabel(str(self.default_A))
+        else :
+            self.tcA.SetLabel(str(self.Avalue))
+        if self.Bvalue==None:
+            self.tcB.SetLabel(str(self.default_B))
+        else:
+            self.tcB.SetLabel(str(self.Bvalue))
+        if self.ErrAvalue==None:
+            self.tcErrA.SetLabel(str(0.0))
+        else:
+            self.tcErrA.SetLabel(str(self.ErrAvalue))
+        if self.ErrBvalue==None:
+            self.tcErrB.SetLabel(str(0.0))
+        else:
+            self.tcErrB.SetLabel(str(self.ErrBvalue))
+        if self.Chivalue==None:
+            self.tcChi.SetLabel(str(0.0))
+        else:
+            self.tcChi.SetLabel(str(self.Chivalue))
         if self.plottable.x !=[]:
             self.mini =min(self.plottable.x)
@@ -186,5 +200,5 @@
                 xminView=self.floatTransform(xmin)
                 xmaxView=self.floatTransform(xmax)
-                if (self.xtrans=="log10(x)"):
+                if (self.xLabel=="log10(x)"):
                     self.FXmin.SetValue(str(math.log10(xminView)))
                     self.FXmax.SetValue(str(math.log10(xmaxView)))
@@ -195,6 +209,6 @@
                 self.FXmax.Disable()
                 # Store the transformed values of view x, y,dy in variables  before the fit
-                if  self.ytrans.lower() == "log10(y)":
-                    if (self.xtrans.lower() == "log10(x)"):
+                if  self.yLabel.lower() == "log10(y)":
+                    if (self.xLabel.lower() == "log10(x)"):
                         for i in range(len(x)):
                             if x[i]>= math.log10(xmin):
@@ -209,5 +223,5 @@
                     tempdy = dy
                
-                if (self.xtrans.lower() == "log10(x)"):
+                if (self.xLabel.lower() == "log10(x)"):
                     for x_i in x:
                         if x_i >= math.log10(xmin):
@@ -215,14 +229,8 @@
                 else:
                     tempx = x
-                       
-                #for y_i in y:
-                #    dy = math.sqrt(math.fabs(y_i))
-                #    if dy >= y_i:
-                #        dy = 0.9*y_i
-                #    tempdy.append(dy)
-                       
+              
                 #Find the fitting parameters
                 
-                if (self.xtrans.lower() == "log10(x)"):
+                if (self.xLabel.lower() == "log10(x)"):
                     chisqr, out, cov = fittings.sansfit(self.model, [self.cstA, self.cstB],
                     tempx, tempy,tempdy,math.log10(xmin),math.log10(xmax))
@@ -230,5 +238,5 @@
                     chisqr, out, cov = fittings.sansfit(self.model, 
                                 [self.cstA, self.cstB],tempx, tempy,tempdy,xminView,xmaxView)
-                print "this out",out
+                #print "this out",out
                 #Check that cov and out are iterable before displaying them
                 if cov ==None:
@@ -253,5 +261,5 @@
                 # load tempy with the minimum transformation
                
-                if self.xtrans == "log10(x)":
+                if self.xLabel == "log10(x)":
                     y_model = self.model.run(math.log10(xmin))
                     tempx.append(xmin)
@@ -260,5 +268,5 @@
                     tempx.append(xminView)
                     
-                if self.ytrans == "log10(y)":
+                if self.yLabel == "log10(y)":
                     tempy.append(math.pow(10,y_model))
                     print "tempy",tempy
@@ -267,5 +275,5 @@
                     
                 # load tempy with the maximum transformation
-                if self.xtrans == "log10(x)":
+                if self.xLabel == "log10(x)":
                     y_model = self.model.run(math.log10(xmax))
                     tempx.append(xmax)
@@ -274,13 +282,19 @@
                     tempx.append(xmaxView)
                     
-                if self.ytrans == "log10(y)":
+                if self.yLabel == "log10(y)":
                     tempy.append(math.pow(10,y_model))
                 else: 
                     tempy.append(y_model)
-               
-                self.push_data(tempx,tempy,xminView,xmaxView,xmin,xmax)
+                self.Avalue=cstA
+                self.Bvalue=cstB
+                self.ErrAvalue=errA
+                self.ErrBvalue=errB
+                self.Chivalue=chisqr
+                self.push_data(tempx,tempy,xminView,xmaxView,xmin,xmax,self._ongetValues())
                 
                 # Display the fitting value on the Fit Dialog
                 self._onsetValues(cstA, cstB, errA,errB,chisqr)
+               
+               
             
     def _onsetValues(self,cstA,cstB,errA,errB,Chi):
@@ -293,4 +307,10 @@
          self.tcErrB.SetValue(str(errB))
          self.tcChi.SetValue(str(Chi))
+        
+    def _ongetValues(self):
+         """
+              Display  the value on fit Dialog 
+         """
+         return self.Avalue, self.Bvalue,self.ErrAvalue,self.ErrBvalue,self.Chivalue
          
     def _returnPlottable(self):
@@ -322,11 +342,11 @@
              not in x
         """
-        if ( self.xtrans=="x" ):
+        if ( self.xLabel=="x" ):
             return transform.toX(x)
         
-        if ( self.xtrans=="x^(2)" ): 
+        if ( self.xLabel=="x^(2)" ): 
             return transform.toX2(x)
         
-        if (self.xtrans=="log10(x)" ):
+        if (self.xLabel=="log10(x)" ):
             if x >0:
                 return x
@@ -341,5 +361,5 @@
         value = item.GetValue()
         # Check for possible values entered
-        if (self.xtrans=="log10(x)"):
+        if (self.xLabel=="log10(x)"):
             if (float(value) > 0):
                 item.SetBackgroundColour(wx.WHITE)
@@ -353,5 +373,5 @@
        
     def setFitRange(self,xmin,xmax,Reelxmin,Reelxmax):
-        if (self.xtrans=="log10(x)"):
+        if (self.xLabel=="log10(x)"):
             self.FXmin.SetValue(str(math.log10(xmin)))
             self.FXmax.SetValue(str(math.log10(xmax)))
Index: guitools/plottables.py
===================================================================
--- guitools/plottables.py	(revision 150c04a24a22c547a7794c40bfb8d089fe3ff50b)
+++ guitools/plottables.py	(revision b43a00952d61f7d74e84e0fd6420c550eadbfaab)
@@ -53,17 +53,5 @@
             if not cond: return False
         return True
-def error_msg(msg, parent=None):
-    """
-    Signal an error condition -- in a GUI, popup a error dialog
-    """
-    # Code brought with minor podifications from mpl.backends.backend_wx
-    # Copyright (C) Jeremy O'Donoghue & John Hunter, 2003-4
-    dialog =wx.MessageDialog(parent  = parent,
-                             message = msg,
-                             caption = 'Polplot error',
-                             style=wx.OK | wx.CENTRE)
-    dialog.ShowModal()
-    dialog.Destroy()
-    return None
+
 # Graph structure for holding multiple plottables
 class Graph:
@@ -204,6 +192,6 @@
                      "title":""}
         self.plottables = {}
-    def setGraph(self,listofplottable):
-        self.plottables = listofplottable
+        
+        
     def _make_labels(self):
         # Find groups of related plottables
@@ -223,4 +211,9 @@
     
     def returnPlottable(self):
+        """
+            This method returns a dictionary of plottables contained in graph
+            It is just by Plotpanel to interact with the complete list of plottables 
+            inside the graph.
+        """
         return self.plottables
 
@@ -234,6 +227,5 @@
         plot.render()
    
-    def clear(self,plot): 
-        plot.clear()
+   
 
     def __init__(self,**kw):
@@ -376,7 +368,12 @@
     ##Use the following if @classmethod doesn't work
     # labels = classmethod(labels)
-    def getTransform(self,transx,transy):
-        self.view.transx = transx
-        self.view.transy = transy
+    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 __init__(self):
@@ -418,25 +415,61 @@
     
     def transformView(self):
-       
+        """
+            It transforms x, y before displaying
+        """
         self.view.transform( self.x, self.y, self.dx,self.dy)
         
     def returnValuesOfView(self):
+        """
+            Return View parameters and it is used by Fit Dialog
+        """
         return self.view.returnXview()
     
     def check_data_PlottableX(self): 
+        """
+            Since no transformation is made for log10(x), check that 
+            no negative values is plot in log scale
+        """
         self.view.check_data_logX()
         
     def check_data_PlottableY(self): 
+        """
+            Since no transformation is made for log10(y), check that 
+            no negative values is plot in log scale
+        """
         self.view.check_data_logY() 
         
-    def returnTransformationx(self,transx,transdx):
-        self.view.returntransformx(transx,transdx)
-        
-    def returnTransformationy(self,transy,transdy):
-        self.view.returntransformy(transy,transdy)
+    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):
+        """
+            Reset x, y, dx, dy view with its parameters
+        """
         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:
         """
@@ -454,13 +487,13 @@
             self.dx = dx
             self.dy = dy
-            #to change x range to the reel range
+            # To change x range to the reel range
             self.Xreel = self.x
             self.Yreel = self.y
             self.DXreel = self.dx
             self.DYreel = self.dy
-            
-            self.transx =""
-            self.transy =""
-            # function to transform x and y
+            # Labels of x and y received from Properties Dialog
+            self.xLabel =""
+            self.yLabel =""
+            # Function to transform x, y, dx and dy
             self.funcx= None
             self.funcy= None
@@ -469,14 +502,15 @@
         def transform(self, x=None,y=None,dx=None, dy=None):
             """
-                Transforms the x and dx vectors and stores the output.
-                
-                @param func: function to apply to the data
+                Transforms the x,y,dx and dy vectors and stores the output in View parameters
+        
                 @param x: array of x values
-                @param dx: array of error values
-                @param errfunc: function to apply to errors
+                @param y: array of y values
+                @param dx: array of  errors values on x 
+                @param dy: array of error values on y
             """
             
             # Sanity check
-            if (x!=None) and (y!=None):
+            # Do the transofrmation only when x and y are empty
+            if (x!=None) and (y!=None): 
                 if dx and not len(x)==len(dx):
                         raise ValueError, "Plottable.View: Given x and dx are not of the same length" 
@@ -522,28 +556,57 @@
                 and(len(self.x)==len(self.y))and(len(self.y)==len(self.dy)) :
                         raise ValueError, "Plottable.View: Given x,y,dy and dx are not of the same length" 
+                # Check that negative values are not plot on x and y axis for log10 transformation
                 self.check_data_logX()
                 self.check_data_logY()
+                # Store x ,y dx,and dy in their full range for reset
                 self.Xreel = self.x
                 self.Yreel = self.y
                 self.DXreel = self.dx
                 self.DYreel = self.dy
+                
+                
+                
         def onResetView(self):
-            self.x=self.Xreel
-            self.y=self.Yreel
-            self.dx=self.DXreel
-            self.dy=self.DYreel
-        def returntransformx(self,funcx,funcdx):    
+            """
+                Reset x,y,dx and y in their full range  and in the initial scale
+                in case their previous range has changed  
+            """
+            self.x = self.Xreel
+            self.y = self.Yreel
+            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
+            """
             self.funcx= funcx
             self.funcdx= funcdx
             
-        def returntransformy(self,funcy,funcdy):    
+        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
+            """    
             self.funcy= funcy
             self.funcdy= funcdy
        
         def returnXview(self):
+            """
+                Return View  x,y,dx,dy
+            """
             return self.x,self.y,self.dx,self.dy
         
      
         def check_data_logX(self): 
+            """
+                 Remove negative value in x vector 
+                 to avoid plotting negative value of Log10
+            """
             tempx=[]
             tempdx=[]
@@ -554,5 +617,5 @@
             if self.dy==None:
                 self.dy=numpy.zeros(len(self.y))
-            if self.transx=="log10(x)" :
+            if self.xLabel=="log10(x)" :
                 for i in range(len(self.x)):
                     try:
@@ -568,14 +631,14 @@
                         pass 
            
-                self.x=[]
-                self.dx=[]
-                self.y=[]
-                self.dy=[]
-                self.x=tempx
-                self.y=tempy
-                self.dx=tempdx
-                self.dy=tempdy
+                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=[]
             tempdx=[]
@@ -586,5 +649,5 @@
             if self.dy==None:
                 self.dy=numpy.zeros(len(self.y))
-            if (self.transy == "log10(y)" ):
+            if (self.yLabel == "log10(y)" ):
                 for i in range(len(self.x)):
                      try:
@@ -598,15 +661,16 @@
                         print sys.exc_value  
                         pass
-                
-                self.x=[]
-                self.dx=[]
-                self.y=[]
-                self.dy=[]
-                self.x=tempx
-                self.y=tempy
-                self.dx=tempdx
-                self.dy=tempdy
+              
+                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=[]
             tempdx=[]
@@ -676,5 +740,5 @@
         The title is the name that will show up on the legend.
         """
-        self.name= "theo"
+        self.name= "theory"
         self.x = x
         self.y = y
@@ -683,4 +747,5 @@
         self.yaxis( 'intensity', 'cm')
         self.view = self.View(self.x, self.y, None, self.dy)
+        
     def render(self,plot,**kw):
         #plot.curve(self.x,self.y,dy=self.dy,**kw)
