Index: sansguiframe/src/sans/guiframe/gui_manager.py
===================================================================
--- sansguiframe/src/sans/guiframe/gui_manager.py	(revision 6306f2f639a273e7a698e0d6b26872deb4bf2777)
+++ sansguiframe/src/sans/guiframe/gui_manager.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -452,5 +452,11 @@
             return
         _, ext = os.path.splitext(name)
-        fd = open(file_name, 'w')
+        try:
+            fd = open(file_name, 'w')
+        except:
+            # On Permission denied: IOError
+            temp_dir = get_user_directory()
+            temp_file_name = os.path.join(temp_dir, name)
+            fd = open(temp_file_name, 'w')
         separator = "\t"
         if ext.lower() == ".csv":
@@ -491,7 +497,7 @@
             excel_app.Visible = 1
         except:
-            msg = "Error occured when calling Excel\n"
-            msg += "Check that Excel in installed in this machine or \n"
-            msg += "Check that %s really exists.\n" % str(file_name)
+            msg = "Error occured when calling Excel.\n"
+            msg += "Check that Excel installed in this machine or \n"
+            msg += "check that %s really exists.\n" % str(file_name)
             wx.PostEvent(self, StatusEvent(status=msg,
                                              info="error"))
@@ -1031,5 +1037,18 @@
         return menu_list
         
-        
+    def get_current_context_menu(self, plotpanel=None):
+        """
+        Get the context menu items made available 
+        by the current plug-in. 
+        This function is used by the plotting module
+        """
+        if plotpanel is None:
+            return
+        menu_list = []
+        item = self._current_perspective
+        if item != None:
+            menu_list.extend(item.get_context_menu(plotpanel=plotpanel))
+        return menu_list
+            
     def on_panel_close(self, event):
         """
@@ -2598,8 +2617,13 @@
                 if has_errors:
                     if data.dx != [] and data.dx[i] != None:
-                        out.write("%g  %g  %g  %g\n" % (data.x[i], 
-                                                    data.y[i],
-                                                    data.dy[i],
-                                                    data.dx[i]))
+                        if  data.dx[i] != None:
+                            out.write("%g  %g  %g  %g\n" % (data.x[i], 
+                                                        data.y[i],
+                                                        data.dy[i],
+                                                        data.dx[i]))
+                        else:
+                            out.write("%g  %g  %g\n" % (data.x[i], 
+                                                        data.y[i],
+                                                        data.dy[i]))
                     else:
                         out.write("%g  %g  %g\n" % (data.x[i], 
Index: sansguiframe/src/sans/guiframe/gui_statusbar.py
===================================================================
--- sansguiframe/src/sans/guiframe/gui_statusbar.py	(revision 199fdec04f37527fb4df9b246657fd366ca3979d)
+++ sansguiframe/src/sans/guiframe/gui_statusbar.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -238,8 +238,9 @@
         clear the progress bar
         """
-        flag = False
-        if (self.nb_start <= self.nb_stop) or \
-            (self.nb_progress <= self.nb_stop):
-            flag = True
+        flag = True
+        # Why we do this?
+        #if (self.nb_start <= self.nb_stop) or \
+        #    (self.nb_progress <= self.nb_stop):
+        #    flag = True
         return flag
     
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/AnnulusSlicer.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/AnnulusSlicer.py	(revision 13382fc7d6239b432b9612e03e8b6f5c1beeb0b8)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/AnnulusSlicer.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -167,6 +167,6 @@
 
         new_plot.group_id = "AnnulusPhi" + self.base.data2D.name
-        new_plot.id = None
-        #new_plot.is_data= True
+        new_plot.id = "AnnulusPhi" + self.base.data2D.name
+        new_plot.is_data= True
         new_plot.xtransform = "x"
         new_plot.ytransform = "y"
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 78919f451c2c75108982c75a7aec976d4f58a145)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -41,5 +41,5 @@
 DEFAULT_BEAM = 0.005
 BIN_WIDTH = 1
-
+IS_MAC = (sys.platform == 'darwin')
 
 class ModelPanel1D(PlotPanel, PanelBase):
@@ -174,4 +174,10 @@
         # It was found that wx >= 2.9.3 sends an event even if no size changed.
         # So manually recode the size (=x_size) and compare here.
+        # Massy code to work around:<
+        if self.parent._mgr != None:
+            max_panel = self.parent._mgr.GetPane(self)
+            if max_panel.IsMaximized():
+                self.parent._mgr.RestorePane(max_panel)
+                max_panel.Maximize()
         if self.x_size != None:
             if self.x_size == self.GetSize():
@@ -286,4 +292,7 @@
             try:
                 self._onEVT_FUNC_PROPERTY()
+                if IS_MAC:
+                    # MAC: forcing to plot 2D avg
+                    self.canvas._onDrawIdle()
             except:
                 msg=" Encountered singular points..."
@@ -409,6 +418,15 @@
                 if plot != self.plots[self.graph.selected_plottable]:
                     continue
+                
+            id = wx.NewId()
+            plot_menu.Append(id, "&DataInfo", name)
+            wx.EVT_MENU(self, id, self. _onDataShow)
+            id = wx.NewId()
+            plot_menu.Append(id, "&Save Points as a File", name)
+            wx.EVT_MENU(self, id, self._onSave)
+            plot_menu.AppendSeparator()
+            
             #add menu of other plugins
-            item_list = self.parent.get_context_menu(self)
+            item_list = self.parent.get_current_context_menu(self)
               
             if (not item_list == None) and (not len(item_list) == 0):
@@ -425,12 +443,5 @@
                         pass
                 plot_menu.AppendSeparator()
-                
-            id = wx.NewId()
-            plot_menu.Append(id, "&DataInfo", name)
-            wx.EVT_MENU(self, id, self. _onDataShow)
-            id = wx.NewId()
-            plot_menu.Append(id, "&Save Points as a File", name)
-            wx.EVT_MENU(self, id, self._onSave)
-            plot_menu.AppendSeparator()
+            
             if self.parent.ClassName.count('wxDialog') == 0: 
                 id = wx.NewId()
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter2D.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter2D.py	(revision 2778c4f23185a3c3c4b74a32e3cc7e6a483122f2)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter2D.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -321,5 +321,5 @@
         if len(self.data2D.detector) == 1:        
             
-            item_list = self.parent.get_context_menu(self)
+            item_list = self.parent.get_current_context_menu(self)
             if (not item_list == None) and (not len(item_list) == 0) and\
                 self.data2D.name.split(" ")[0] != 'Residuals':  
@@ -631,5 +631,5 @@
             new_plot.yaxis("\\rm{Intensity} ", "cm^{-1}")
 
-        new_plot.group_id = "Circ avg " + self.data2D.name
+        new_plot.group_id = "2daverage"  + self.data2D.name
         new_plot.id = "Circ avg " + self.data2D.name
         new_plot.is_data = True
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/SectorSlicer.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/SectorSlicer.py	(revision 789ffc6013a5d6655e5dc153e1686836e70f7bb0)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/SectorSlicer.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -183,6 +183,6 @@
             new_plot.yaxis("\\rm{Residuals} ", "/")
 
-        new_plot.group_id = "SectorQ" + self.base.data2D.name
-        new_plot.id = None
+        new_plot.group_id = "2daverage" + self.base.data2D.name
+        new_plot.id = "SectorQ" + self.base.data2D.name
         new_plot.is_data = True
         self.base.parent.update_theory(data_id=data, \
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/SlicerParameters.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/SlicerParameters.py	(revision 8c347a61193367bd8a75b5a9949e34a45f6b9385)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/SlicerParameters.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -87,5 +87,4 @@
                     ctl.SetValue(format_number(str(params[item])))
                     self.Bind(wx.EVT_TEXT_ENTER, self.onTextEnter)
-                    ctl.Bind(wx.EVT_KILL_FOCUS, self.onTextEnter)
                     self.parameters.append([item, ctl])
                     self.bck.Add(ctl, (iy, ix), (1, 1), 
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/boxSlicer.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/boxSlicer.py	(revision 13382fc7d6239b432b9612e03e8b6f5c1beeb0b8)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/boxSlicer.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -198,7 +198,7 @@
             new_plot.yaxis("\\rm{Residuals} ", "/")
             
-        new_plot.group_id = str(self.averager.__name__) + self.base.data2D.name
-        #new_plot.id = str(self.averager.__name__)
-        #new_plot.is_data= True
+        new_plot.group_id = "2daverage" + self.base.data2D.name
+        new_plot.id = (self.averager.__name__) + self.base.data2D.name
+        new_plot.is_data= True
         self.base.parent.update_theory(data_id=self.base.data2D.id, \
                                        theory=new_plot)
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/plotting.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/plotting.py	(revision 48832acc10aa946740ade3cf47902b02cfd40995)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/plotting.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -276,29 +276,37 @@
         
         """
+        action_check = False
         if hasattr(event, 'action'):
-            group_id = event.group_id
-            if group_id in self.plot_panels.keys():
-                #remove data from panel
-                if event.action.lower().strip() == 'remove':
-                    id = event.id
-                    return self.remove_plot(group_id, id)
-                if event.action.lower().strip() == 'hide':
-                    return self.hide_panel(group_id)
-                if event.action.lower().strip() == 'delete':
-                    panel = self.plot_panels[group_id]
-                    uid = panel.uid
-                    return self.parent.delete_panel(uid)
-                if event.action.lower().strip() == "clear":
-                    return self.clear_panel_by_id(group_id)
+            action_string = event.action.lower().strip()
+            if action_string == 'check':
+                action_check = True
+            else:
+                group_id = event.group_id
+                if group_id in self.plot_panels.keys():
+                    #remove data from panel
+                    if action_string == 'remove':
+                        id = event.id
+                        return self.remove_plot(group_id, id)
+                    if action_string == 'hide':
+                        return self.hide_panel(group_id)
+                    if action_string == 'delete':
+                        panel = self.plot_panels[group_id]
+                        uid = panel.uid
+                        return self.parent.delete_panel(uid)
+                    if action_string == "clear":
+                        return self.clear_panel_by_id(group_id)
+                    
         if not hasattr(event, 'plot'):    
             return
         title = None
         if hasattr(event, 'title'):
-            title = 'Graph'#event.title
-                
+            title = 'Graph'#event.title      
         data = event.plot
-        group_id = data.group_id
-            
-        if group_id in self.plot_panels.keys():
+        group_id = data.group_id    
+        if group_id in self.plot_panels.keys():
+            if action_check:
+                # Check if the plot already exist. if it does, do nothing.
+                if data.id in self.plot_panels[group_id].plots.keys():
+                    return 
             #update a panel graph 
             panel = self.plot_panels[group_id]
@@ -309,7 +317,22 @@
                 new_panel = self.create_1d_panel(data, group_id)
             else:
+                # Need to make the group_id consistent with 1D thus no if below
+                if len(self.plot_panels.values()) > 0:
+                    for p_group_id in self.plot_panels.keys():
+                        p_plot = self.plot_panels[p_group_id]
+                        if data.id in p_plot.plots.keys():
+                            p_plot.plots[data.id] = data
+                            self.plot_panels[group_id] = p_plot
+                            if group_id != p_group_id:
+                                del self.plot_panels[p_group_id]
+                                if p_group_id in data.list_group_id:
+                                    data.list_group_id.remove(p_group_id)
+                                if group_id not in data.list_group_id:
+                                    data.list_group_id.append(group_id)
+                            p_plot.group_id = group_id
+                            return
+                
                 new_panel = self.create_2d_panel(data, group_id)
-            self.create_panel_helper(new_panel, data, group_id, title)
-            
+            self.create_panel_helper(new_panel, data, group_id, title) 
         return
 
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/profile_dialog.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/profile_dialog.py	(revision 2d443fde5deda0cbc1b82bb103bbf62e4c79cfcc)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/profile_dialog.py	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -53,4 +53,5 @@
             self.SetTitle("Scattering Length Density Profile")
             self.parent = parent
+            self._mgr = None
             self.data = data
             self.str = self.data.__str__()
@@ -75,4 +76,5 @@
             self.newplot.dy = None
             self.newplot.name = 'SLD'
+            self.newplot.id = self.newplot.name
             self.plotpanel.add_image(self.newplot) 
             self.plotpanel.subplot.set_ylim(min(data_plot.y) - _Y_OFF , 
@@ -81,4 +83,7 @@
                                                 max(data_plot.x) + _X_OFF)
             #self.Centre()
+            self.plotpanel.resizing = False
+            self.plotpanel.canvas.set_resizing(self.plotpanel.resizing)
+            self.plotpanel.subplot.figure.canvas.draw_idle()
             self.Layout()
 
@@ -175,4 +180,10 @@
         self.parent.parent.parent.on_change_caption(name, old_caption, new_caption)
     
+    def disable_app_menu(self, panel):
+        """
+        Disable menu bar
+        """
+        # Not implemented!
+        return
     
 class SLDplotpanel(PlotPanel):
@@ -203,4 +214,5 @@
         self.yaxis_label = ''
         self.yaxis_unit = ''
+        self.resizing = True
         
     def add_image(self, plot):
@@ -208,8 +220,6 @@
         Add image(Theory1D)
         """
-        self.plots[plot.name] = plot
-        self.plots[plot.name].is_data = False
-        #init graph
-        #self.gaph = Graph()
+        self.plots[plot.id] = plot
+        self.plots[plot.id].is_data = True
         #add plot
         self.graph.add(plot)
@@ -222,11 +232,10 @@
         self.yaxis_unit = '10^{-6}A^{-2}'
         self.graph.yaxis(self.yaxis_label, self.yaxis_unit)
+        #self.subplot.figure.canvas.draw_idle()
+        # For latter scale changes 
+        self.plots[plot.id].xaxis('\\rm{%s} '% x1_label, 'A')
+        self.plots[plot.id].yaxis('\\rm{SLD} ', '10^{-6}A^{-2}')
         #draw
         self.graph.render(self)
-        self.subplot.figure.canvas.draw_idle()
-                
-        # For latter scale changes 
-        self.plots[plot.name].xaxis('\\rm{%s} '% x1_label, 'A')
-        self.plots[plot.name].yaxis('\\rm{SLD} ', '10^{-6}A^{-2}')
         
     def on_set_focus(self, event):
@@ -257,5 +266,5 @@
         """
         pass
-    
+                           
     def _onSave(self, evt):
         """
@@ -265,55 +274,17 @@
         
         """
-       
-        path = None
-        wildcard = "Text files (*.txt)|*.txt|"\
-                    "CanSAS 1D files(*.xml)|*.xml" 
-        default_name = "sld_profile"
+        menu = evt.GetEventObject()
+        id = evt.GetId()
+        self.set_selected_from_menu(menu, id)
+        data = self.plots[self.graph.selected_plottable]
+        default_name = data.label
+        if default_name.count('.') > 0:
+            default_name = default_name.split('.')[0]
+        default_name += "_out"
         if self.parent != None:
-            self._default_save_location = self.parent.parent._default_save_location
-        dlg = wx.FileDialog(self, "Choose a file",
-                            self._default_save_location,
-                            default_name, wildcard , wx.SAVE)
-       
-        if dlg.ShowModal() == wx.ID_OK:
-            path = dlg.GetPath()
-            # ext_num = 0 for .txt, ext_num = 1 for .xml
-            # This is MAC Fix
-            ext_num = dlg.GetFilterIndex()
-            if ext_num == 0:
-                format = '.txt'
-            else:
-                format = '.xml'
-            path = os.path.splitext(path)[0] + format
-            mypath = os.path.basename(path)
-            
-            #TODO: This is bad design. The DataLoader is designed 
-            #to recognize extensions.
-            # It should be a simple matter of calling the .
-            #save(file, data, '.xml') method
-            # of the sans.dataloader.loader.Loader class.
-            from sans.dataloader.loader import  Loader
-            #Instantiate a loader 
-            loader = Loader() 
-            data = self.parent.data
-            format = ".txt"
-            if os.path.splitext(mypath)[1].lower() == format:
-                # Make sure the ext included in the file name
-                # especially on MAC
-                fName = os.path.splitext(path)[0] + format
-                self._onsaveTXT(fName)
-            format = ".xml"
-            if os.path.splitext(mypath)[1].lower() == format:
-                # Make sure the ext included in the file name
-                # especially on MAC
-                fName = os.path.splitext(path)[0] + format
-                loader.save(fName, data, format)
-            try:
-                self._default_save_location = os.path.dirname(path)
-                self.parent.parent._default_save_location = self._default_save_location
-            except:
-                pass    
-        dlg.Destroy()
-         
+            # What an ancestor!
+            fit_panel = self.parent.parent.parent
+            fit_panel.parent.save_data1d(data, default_name)
+             
 class ViewerFrame(wx.Frame):
     """
Index: sansguiframe/src/sans/guiframe/media/Graph_help.html
===================================================================
--- sansguiframe/src/sans/guiframe/media/Graph_help.html	(revision d8740928b8b3419225ae25a86319a24bfa86ac72)
+++ sansguiframe/src/sans/guiframe/media/Graph_help.html	(revision 940aca737db034347a7b2bcbe30f143b76e47cbc)
@@ -7,8 +7,8 @@
 <li><a href="#reset">Reset Graph</a></li>
 <li><a href="#hide">Hide/Show/Delete Graph</a></li>
+<li><a href="#info">Data Info</a></li>
 <li><a href="#save">Save plot Image</a></li>
 <li><a href="#savedata">Save Data</a></li>
 <li><a href="#drag">Drag plot</a></li>
-<li><a href="#select">Select Data</a></li>
 <li><a href="#zoom">Zoom In/Out</a></li>
 <li><a href="#remove">Remove Data</a></li>
@@ -33,5 +33,5 @@
 <h5><a name="hide">Hide/Show/Delete Graph</a></h5>
 <p>
-	To Hide, click the Hide (closed eye) button in the tool bar.<br>
+	To Hide, click the Hide (bar) button in the tool bar.<br>
 	To Show, select the the 'Show' menuitem in the 'Graph' menu in the menu bar.<br>
 	To Delete, click the 'x' button in the title bar.<br>
@@ -43,4 +43,9 @@
 	Right click on plot. Context menu will pop-up select save image [file name].A dialog
 	window opens and write a the name of the file to save and click on <b>Save Image.</b>
+</p>
+
+<h5><a name="info"> Data Info</a></h5>
+<p>
+	From the context menu, select 'Data Info' to see the data information dialog panel.
 </p>
 
