Index: plottools/src/danse/common/plottools/PlotPanel.py
===================================================================
--- plottools/src/danse/common/plottools/PlotPanel.py	(revision 9bab1417301cac901bb386a2aa0e3dd6878eb0a1)
+++ plottools/src/danse/common/plottools/PlotPanel.py	(revision 8f59e95b3001fbd69e1670fadfe4ea035b66a676)
@@ -948,10 +948,11 @@
         self.onContextMenu(event)
         
-    def onLegend(self, event):
+# modified kieranrcampbell ILL june2012
+    def onLegend(self,legOnOff):
         """
         Toggles whether legend is visible/not visible
         """
         
-        if self.legend_on:
+        if not legOnOff:
             for ax in self.axes:
                 self.remove_legend(ax)
@@ -971,6 +972,9 @@
         
         self.subplot.figure.canvas.draw_idle()
-        self.legend_on = not self.legend_on
+        self.legend_on = legOnOff
     
+
+    # to do - remove this function when done
+
     def onChangeLegendLoc(self, event):
         """
@@ -997,4 +1001,29 @@
         self.subplot.figure.canvas.draw_idle()
         
+
+    def ChangeLegendLoc(self, label):
+        """
+        Changes legend loc based on user input
+        """
+        
+        self.legendLoc = label
+        self.legend_pos_loc = None
+        # sort them by labels
+        handles, labels = self.subplot.get_legend_handles_labels()
+        hl = sorted(zip(handles, labels),
+                    key=operator.itemgetter(1))
+        handles2, labels2 = zip(*hl)
+        self.line_collections_list = handles2
+        self.legend = self.subplot.legend(handles2, labels2,
+                            prop=FontProperties(size=10), numpoints=1,
+                            handletextsep=.05, loc=self.legendLoc)
+        if self.legend != None:
+                self.legend.set_picker(self.legend_picker)
+                self.legend.set_axes(self.subplot)
+        self.subplot.figure.canvas.draw_idle()
+        
+
+
+
     def remove_legend(self, ax=None):
         """
@@ -1048,12 +1077,10 @@
         #based on this and plot it at user designated coordinates
 
-    def onGridOnOff(self, event):
+    def onGridOnOff(self,gridon_off):
         """
         Allows ON/OFF Grid
         """
-        if self.grid_on:
-            self.grid_on = False
-        else:
-            self.grid_on = True
+        self.grid_on = gridon_off
+
         self.subplot.figure.canvas.draw_idle()
         
@@ -1266,4 +1293,6 @@
         
         """
+
+        self.xcolor = color
         if units != "":
             label = label + " (" + units + ")"
@@ -1284,4 +1313,6 @@
     def yaxis(self, label, units, font=None, color='black', t_font=None):
         """yaxis label and units."""
+        self.ycolor = color
+
         if units != "":
             label = label + " (" + units + ")"
Index: plottools/src/danse/common/plottools/SimpleFont.py
===================================================================
--- plottools/src/danse/common/plottools/SimpleFont.py	(revision 8f59e95b3001fbd69e1670fadfe4ea035b66a676)
+++ plottools/src/danse/common/plottools/SimpleFont.py	(revision 8f59e95b3001fbd69e1670fadfe4ea035b66a676)
@@ -0,0 +1,121 @@
+
+"""
+/**
+	This software was developed by Institut Laue-Langevin as part of
+	Distributed Data Analysis of Neutron Scattering Experiments (DANSE).
+
+	Copyright 2012 Institut Laue-Langevin
+
+**/
+
+"""
+
+# this is a dead simple dialog for getting font family, size,style and weight
+
+
+import wx
+from matplotlib.font_manager import FontProperties
+
+FAMILY = ['serif', 'sans-serif', 'fantasy', 'monospace']
+SIZE = [8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72]
+STYLE = ['normal', 'italic']
+WEIGHT = ['light', 'normal', 'bold']
+
+
+class SimpleFont(wx.Dialog):
+    def __init__(self,parent,id,title):
+
+        wx.Dialog.__init__(self,parent,id,title,size=(440,160))
+        self.parent = parent
+#        self.SetWindowVariant(variant=FONT_VARIANT)
+
+        self.family = FAMILY[1]
+        self.size = SIZE[3]
+        self.style = STYLE[0]
+        self.weight = WEIGHT[1]
+
+        self.InitUI()
+        self.Centre()
+        self.Show()
+
+
+    def InitUI(self):
+        vbox = wx.BoxSizer(wx.VERTICAL)
+        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
+        hbox2 = wx.BoxSizer(wx.HORIZONTAL)
+        hbox3 = wx.BoxSizer(wx.HORIZONTAL)
+
+        gs = wx.GridSizer(2,4,-1,-1)
+
+        self.fontFamily = wx.ComboBox(self,pos=(80,10),style=wx.CB_READONLY,
+                                      size=(100,-1))
+        self.fontStyle = wx.ComboBox(self,pos=(80,60),style=wx.CB_READONLY,
+                                     size=(100,-1))
+
+        self.fontPoint = wx.ComboBox(self,pos=(300,10),style=wx.CB_READONLY,
+                                     size=(100,-1))
+        self.fontWeight = wx.ComboBox(self,pos=(300,60),
+                                      style=wx.CB_READONLY,size=(100,-1))
+
+        self.okButton = wx.Button(self,wx.ID_OK,'OK',pos=(215,100))
+        self.closeButton = wx.Button(self,wx.ID_CANCEL,'Cancel',pos=(315,100))
+
+        self._set_family_list()
+        self._set_style_list()
+        self._set_weight_list()
+        self._set_point_list()
+
+        familyText = wx.StaticText(self, label='Family:', pos=(10,12))
+        sizeText = wx.StaticText(self, label='Size:',pos=(220,12))
+        styleText = wx.StaticText(self, label='Style:',pos=(10,62))
+        weightText = wx.StaticText(self, label='Weight:',pos=(220,62))
+
+    def _set_family_list(self):
+        # list of font family
+        list = FAMILY
+        for idx in range(len(list)):
+            self.fontFamily.Append(list[idx],idx)
+
+    def _set_style_list(self):
+        # list of styles
+        list = STYLE
+        for idx in range(len(list)):
+            self.fontStyle.Append(list[idx],idx)
+
+    def _set_weight_list(self):
+        #list of weights
+        list = WEIGHT
+        for idx in range(len(list)):
+            self.fontWeight.Append(list[idx],idx)
+
+    def _set_point_list(self):
+        # list of point sizes
+        list = SIZE
+        for idx in range(len(list)):
+            self.fontPoint.Append(str(list[idx]),idx)
+
+
+    def set_default_font(self,font):
+        
+        if not font:
+            self.fontFamily.SetSelection(1)
+            self.fontWeight.SetSelection(1)
+            self.fontPoint.SetSelection(3)
+            self.fontStyle.SetSelection(0)
+
+        else:
+            self.fontWeight.SetStringSelection(font.get_weight())
+            self.fontPoint.SetStringSelection(font.get_size())
+            self.fontFamily.SetStringSelection(font.get_family())
+            self.fontStyle.SetStringSelection(font.get_style())
+        
+
+    def get_font(self):
+        FONT = FontProperties()
+        font = FONT.copy()
+        font.set_size(self.fontPoint.GetValue())
+        font.set_name(str(self.fontFamily.GetValue()))
+        font.set_slant(str(self.fontStyle.GetValue()))
+        font.set_weight(str(self.fontWeight.GetValue()))
+
+        return font
