Index: guitools/PlotPanel.py
===================================================================
--- guitools/PlotPanel.py	(revision 6ed101afdd576ec843ab16c992bbe4992d64a822)
+++ guitools/PlotPanel.py	(revision 47f695c93a98ae92c88d22237d0a4cb935c4d959)
@@ -23,5 +23,37 @@
     if 'get_children' in dir(obj):
         for a in obj.get_children(): show_tree(a,d+1)
-
+def _rescale(lo,hi,step,pt=None,bal=None,scale='linear'):
+        """
+        Rescale (lo,hi) by step, returning the new (lo,hi)
+        The scaling is centered on pt, with positive values of step
+        driving lo/hi away from pt and negative values pulling them in.
+        If bal is given instead of point, it is already in [0,1] coordinates.
+    
+        This is a helper function for step-based zooming.
+        """
+        # Convert values into the correct scale for a linear transformation
+        # TODO: use proper scale transformers
+        if scale=='log':
+            lo,hi = log10(lo),log10(hi)
+            if pt is not None: pt = log10(pt)
+    
+        # Compute delta from axis range * %, or 1-% if persent is negative
+        if step > 0:
+            delta = float(hi-lo)*step/100
+        else:
+            delta = float(hi-lo)*step/(100-step)
+    
+        # Add scale factor proportionally to the lo and hi values, preserving the
+        # point under the mouse
+        if bal is None:
+            bal = float(pt-lo)/(hi-lo)
+        lo = lo - bal*delta
+        hi = hi + (1-bal)*delta
+    
+        # Convert transformed values back to the original scale
+        if scale=='log':
+            lo,hi = pow(10.,lo),pow(10.,hi)
+    
+        return (lo,hi)
 
 
@@ -69,37 +101,5 @@
         self.prevYtrans =" "
         self.canvas.mpl_connect('scroll_event',self.onWheel)
-    def _rescale(lo,hi,step,pt=None,bal=None,scale='linear'):
-        """
-        Rescale (lo,hi) by step, returning the new (lo,hi)
-        The scaling is centered on pt, with positive values of step
-        driving lo/hi away from pt and negative values pulling them in.
-        If bal is given instead of point, it is already in [0,1] coordinates.
-    
-        This is a helper function for step-based zooming.
-        """
-        # Convert values into the correct scale for a linear transformation
-        # TODO: use proper scale transformers
-        if scale=='log':
-            lo,hi = log10(lo),log10(hi)
-            if pt is not None: pt = log10(pt)
-    
-        # Compute delta from axis range * %, or 1-% if persent is negative
-        if step > 0:
-            delta = float(hi-lo)*step/100
-        else:
-            delta = float(hi-lo)*step/(100-step)
-    
-        # Add scale factor proportionally to the lo and hi values, preserving the
-        # point under the mouse
-        if bal is None:
-            bal = float(pt-lo)/(hi-lo)
-        lo = lo - bal*delta
-        hi = hi + (1-bal)*delta
-    
-        # Convert transformed values back to the original scale
-        if scale=='log':
-            lo,hi = pow(10.,lo),pow(10.,hi)
-    
-        return (lo,hi)
+        self.axes = [self.subplot]
 
     def onWheel(self, event):
@@ -120,5 +120,5 @@
             ax.set_ylim((lo,hi))
         else:
-            # Check if zoom happens in the axes
+             # Check if zoom happens in the axes
             xdata,ydata = None,None
             x,y = event.x,event.y
@@ -249,25 +249,5 @@
 
   
-         
-    def onselect(self,event1, event2):
-        print"went here"
-        from matplotlib.widgets import RectangleSelector
-        from pylab import  show, gca, gcf
-
-        'event1 and event2 are the press and release events'
-        x1, y1 = event1.xdata, event1.ydata
-        x2, y2 = event2.xdata, event2.ydata
-        print "(%3.2f, %3.2f) --> (%3.2f, %3.2f)"%(x1,y1,x2,y2)
-        print " The button you used were: ",event1.button, event2.button
-        gca().set_xlim([x1,x2])
-        gca().set_ylim([y1,y2])
-        gcf().canvas.draw_idle()
-       
-        # drawtype is 'box' or 'line' or 'none'
-        LS = RectangleSelector(self.subplot, onselect,drawtype='box',useblit=True)
-        show()
-
-
-
+  
         
     def onSaveImage(self, evt):
@@ -432,5 +412,4 @@
             if ( self.xscales=="x" ):
                 item.returnTransformationx(transform.toX,transform.errToX)
-                
                 self.set_xscale("linear")
                 name, units = item.get_xaxis()
@@ -453,5 +432,4 @@
                 self.set_yscale("linear")
                 name, units = item.get_yaxis()
-                item.check_data_PlottableY() 
                 self.graph.yaxis("log %s" % name,  "%s^{-1}" % units)
                 
@@ -464,5 +442,4 @@
             if ( self.yscales=="log10(y)" ): 
                 item.returnTransformationy(transform.toX,transform.errToX)
-                item.check_data_PlottableY() 
                 self.set_yscale("log")  
                 name, units = item.get_yaxis()
@@ -485,5 +462,4 @@
                 self.set_yscale("linear")
                 name, units = item.get_yaxis()
-                item.check_data_PlottableY() 
                 self.graph.yaxis("%s" %name,  "%s" % units)
                 
@@ -499,6 +475,5 @@
                 self.set_yscale("linear")
                 yname, yunits = item.get_yaxis()
-                xname, xunits = item.get_xaxis()
-                item.check_data_PlottableY() 
+                xname, xunits = item.get_xaxis() 
                 self.graph.yaxis("Log %s%s^{2}" % (yname,xname),  "%s^{-1}%s^{-2}" % (yunits,xunits))
             
Index: guitools/plottables.py
===================================================================
--- guitools/plottables.py	(revision 6ed101afdd576ec843ab16c992bbe4992d64a822)
+++ guitools/plottables.py	(revision 47f695c93a98ae92c88d22237d0a4cb935c4d959)
@@ -383,11 +383,5 @@
         """ Reload view with new value to plot"""
         self.view = self.View(self.x, self.y, self.dx, self.dy)
-        #save the initial value
-        self.view.Xreel = self.view.x
-        self.view.Yreel = self.view.y
-        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
@@ -438,9 +432,5 @@
             self.dx = dx
             self.dy = dy
-            #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 =""
@@ -459,5 +449,4 @@
             """
             
-            
             # Sanity check
             if (x!=None) and (y!=None):
@@ -474,13 +463,10 @@
                 self.dx = []
                 self.dy = []
-                tempx=[]
-                tempdx=[]
-                tempy=[]
-                tempdy=[]
+               
                 if dx==None:
                     dx=numpy.zeros(len(x))
                 if dy==None:
                     dy=numpy.zeros(len(y))
-               
+              
                 for i in range(len(x)):
                     try:
@@ -495,12 +481,22 @@
                          self.dy.append(tempdy)
                     except:
-                         
-                         print "View.transform_x: skipping point %g" % x[i]
-                         print sys.exc_value   
+                         print "View.transform: skipping point x %g" % x[i]
+                         print "View.transform: skipping point y %g" % y[i]
+                         print "View.transform: skipping point dy %g" % dy[i]
+                         print sys.exc_value  
+                print len(self.x)
+                print len(self.dx)
+                print len(self.y)
+                print len(self.dy)
                 # Sanity check
                 if not (len(self.x)==len(self.dx))and(len(self.x)==len(self.dy))\
                 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" 
-            
+                self.check_data_logX()
+                self.check_data_logY()
+                print len(self.x)
+                print len(self.dx)
+                print len(self.y)
+                print len(self.dy)
         def returntransformx(self,funcx,funcdx):    
             self.funcx= funcx
@@ -515,10 +511,4 @@
         
      
-        def reelXrange(self):
-            self.x= self.Xreel
-            self.y= self.Yreel
-            self.dx= self.DXreel
-            self.dy= self.DYreel
-        
         def check_data_logX(self): 
             tempx=[]
@@ -540,16 +530,16 @@
                             tempdy.append(self.dy[i])
                     except:
-                        #print "View.transform_x: skipping point %g" %self.x[i]
+                        print "check_data_logX: skipping point x %g" %self.x[i]
                         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=[]
+                self.dx=[]
+                self.y=[]
+                self.dy=[]
+                self.x=tempx
+                self.y=tempy
+                self.dx=tempdx
+                self.dy=tempdy
             
         def check_data_logY(self): 
@@ -571,16 +561,16 @@
                             tempdy.append(self.dy[i])
                      except:
-                        #print "View.transform_x: skipping point %g" %self.x[i]
+                        print "check_data_logY: skipping point %g" %self.y[i]
                         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=[]
+                self.dx=[]
+                self.y=[]
+                self.dy=[]
+                self.x=tempx
+                self.y=tempy
+                self.dx=tempdx
+                self.dy=tempdy
                 
             
