Index: src/sans/plottools/PlotPanel.py
===================================================================
--- src/sans/plottools/PlotPanel.py	(revision eddb6eca9b813af3dd1f8c272f767fec8e5252fa)
+++ src/sans/plottools/PlotPanel.py	(revision cafa75f43af970e0c66f37733b6aaf7dd2e1b5ff)
@@ -3,5 +3,4 @@
 import logging
 import wx
-import os
 # Try a normal import first
 # If it fails, try specifying a version
@@ -12,13 +11,16 @@
 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
 from matplotlib.figure import Figure
-from sans.plottools import transform
-from sans.plottools.plottables import Data1D
-from sans.plottools.binder import BindArtist
+import os
+import transform
+from plottables import Data1D
+#TODO: make the plottables interactive
+from binder import BindArtist
 from matplotlib.font_manager import FontProperties
 DEBUG = False
 
-from sans.plottools.plottables import Graph
-from sans.plottools.TextDialog import TextDialog
-from sans.plottools.LabelDialog import LabelDialog
+from plottables import Graph
+from plottables import Text
+from TextDialog import TextDialog
+from LabelDialog import LabelDialog
 import operator
 
@@ -36,51 +38,52 @@
         for a in obj.get_children(): show_tree(a, d+1)
      
-from sans.plottools.unitConverter import UnitConvertion as convertUnit
+from unitConverter import UnitConvertion as convertUnit
 
 
 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.
+        """
+        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
-    loprev = lo
-    hiprev = hi
-    if scale == 'log':
-        assert lo > 0
-        if lo > 0:
-            lo = math.log10(lo)
-        if hi > 0:
-            hi = math.log10(hi)
-        if pt is not None:
-            pt = math.log10(pt)
+        This is a helper function for step-based zooming.
+        
+        """
+        # Convert values into the correct scale for a linear transformation
+        # TODO: use proper scale transformers
+        loprev = lo
+        hiprev = hi
+        if scale == 'log':
+            assert lo > 0
+            if lo > 0:
+                lo = math.log10(lo)
+            if hi > 0:
+                hi = math.log10(hi)
+            if pt is not None:
+                pt = math.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)
     
-    # Compute delta from axis range * %, or 1-% if present 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':
-        if (lo <= -250) or (hi >= 250):
-            lo = loprev
-            hi = hiprev
-        else:
-            lo, hi = math.pow(10., lo), math.pow(10., hi)
-    return (lo, hi)
+        # 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':
+            if (lo <= -250) or (hi >= 250):
+                lo = loprev
+                hi = hiprev
+            else:
+                lo, hi = math.pow(10., lo), math.pow(10., hi)
+        return (lo, hi)
 
 
@@ -122,5 +125,5 @@
         self.figure = Figure(None, dpi, linewidth=2.0)
         self.color = '#b3b3b3'
-        from sans.plottools.canvas import FigureCanvas
+        from canvas import FigureCanvas
         self.canvas = FigureCanvas(self, -1, self.figure)
         self.SetColor(color)
@@ -155,7 +158,7 @@
         
         # Define some constants
-        self.colorlist = ['b', 'g', 'r', 'c', 'm', 'y', 'k']
-        self.symbollist = ['o', 'x', '^', 'v', '<', '>', '+',
-                           's', 'd', 'D', 'h', 'H', 'p', '-']
+        self.colorlist = ['b','g','r','c','m','y','k']
+        self.symbollist = ['o','x','^','v','<','>','+',
+                           's','d','D','h','H','p', '-']
         
         #List of texts currently on the plot
@@ -972,6 +975,6 @@
             self.line_collections_list = handles2
             self.legend = self.subplot.legend(handles2, labels2,
-                            prop=FontProperties(size=10), numpoints=1,
-                            handletextsep=.05, loc=self.legendLoc)
+                            prop=FontProperties(size=10),
+                            loc=self.legendLoc)
             if self.legend != None:
                 self.legend.set_picker(self.legend_picker)
@@ -1003,6 +1006,6 @@
         self.line_collections_list = handles2
         self.legend = self.subplot.legend(handles2, labels2,
-                            prop=FontProperties(size=10), numpoints=1,
-                            handletextsep=.05, loc=self.legendLoc)
+                            prop=FontProperties(size=10),
+                            loc=self.legendLoc)
         if self.legend != None:
             self.legend.set_picker(self.legend_picker)
@@ -1103,13 +1106,21 @@
         ## Set the view scale for all plots
         self._onEVT_FUNC_PROPERTY(False)
-        # Check if zoomed
-        try: tb = self.toolbar.wx_ids['Back']
-        except AttributeError: tb = self.toolbar._NTB2_BACK # Cruft
-        toolbar_zoomed = self.toolbar.GetToolEnabled(tb)
-
-        if self.is_zoomed or toolbar_zoomed:
+        if self.is_zoomed:
             # Recover the x,y limits
             self.subplot.set_xlim((xlo, xhi))
             self.subplot.set_ylim((ylo, yhi))
+
+    @property
+    def is_zoomed(self):
+        if hasattr(self.toolbar, "wx_ids"):
+            back = self.toolbar.wx_ids['Back']
+        else: # CRUFT
+            back = self.toolbar._NTB2_BACK
+        toolbar_zoomed = self.toolbar.GetToolEnabled(back)
+        return self._is_zoomed or toolbar_zoomed
+
+    @is_zoomed.setter
+    def is_zoomed(self, value):
+        self._is_zoomed = value
                    
     def _on_yaxis_label(self, event):
@@ -1259,13 +1270,7 @@
                 handles2, labels2 = zip(*hl)
                 self.line_collections_list = handles2
-                try:
-                    self.legend = ax.legend(handles2, labels2, numpoints=1,
+                self.legend = ax.legend(handles2, labels2,
                                 prop=FontProperties(size=10),
-                                handletextsep=.05, loc=self.legendLoc)
-                except TypeError:  # Cruft
-                    # older MPL uses handletextsep instead of handletextpad
-                    self.legend = ax.legend(handles2, labels2, numpoints=1,
-                                prop=FontProperties(size=10),
-                                handletextsep=.05, loc=self.legendLoc)
+                                loc=self.legendLoc)
                 if self.legend != None:
                     self.legend.set_picker(self.legend_picker)
@@ -1274,12 +1279,5 @@
                 
             except:
-                try:
-                    self.legend = ax.legend(prop=FontProperties(size=10),
-                                        numpoints=1, handletextpad=.05,
-                                        loc=self.legendLoc)
-                except TypeError:  # Cruft
-                    # older MPL uses handletextsep instead of handletextpad
-                    self.legend = ax.legend(prop=FontProperties(size=10),
-                                        numpoints=1, handletextsep=.05,
+                self.legend = ax.legend(prop=FontProperties(size=10),
                                         loc=self.legendLoc)
                 
@@ -1894,9 +1892,4 @@
                 self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname, xname),
                                                "%s%s" % (yunits, xunits))
-            if(self.viewModel == "Kratky y*x^(2) vs x"):
-                item.transformY(transform.toYX2, transform.errToYX2)
-                self.graph._yaxis_transformed("%s \ \ %s^{2}" % (yname, xname),
-                                               "%s%s" % (yunits, xunits))                
-                
             item.transformView()
   
@@ -1997,6 +1990,5 @@
         self.graph.render(self)
         self._onEVT_FUNC_PROPERTY(False)
-        if self.is_zoomed:
-                self.is_zoomed = False
+        self.is_zoomed = False
         self.toolbar.update()
         
Index: src/sans/plottools/config.py
===================================================================
--- src/sans/plottools/config.py	(revision a9d5684a6f797bf085c13ace14b5b02de34989db)
+++ src/sans/plottools/config.py	(revision cafa75f43af970e0c66f37733b6aaf7dd2e1b5ff)
@@ -52,2 +52,8 @@
     # if a backend has already been selected, make sure it is the correct one.
     raise ImportError("Matplotlib not using backend " + plot_backend)
+
+# set global plot style
+param = 'legend.handletextpad'
+if param not in matplotlib.rcParams: param = 'legend.handletextsep'
+matplotlib.rcParams[param] = 0.05
+matplotlib.rcParams['legend.numpoints'] = 1
