Index: sansguiframe/src/sans/guiframe/data_processor.py
===================================================================
--- sansguiframe/src/sans/guiframe/data_processor.py	(revision 4c712ea419a5e7a5740e15096be8559277050e19)
+++ sansguiframe/src/sans/guiframe/data_processor.py	(revision fd51a7c88fc36ad61282a8ca37593afce2a8d43e)
@@ -91,4 +91,5 @@
         self.AdjustScrollbars()
         #self.SetLabelBackgroundColour('#DBD4D4')
+        self.uid = wx.NewId()
         self.parent = parent
         self.panel = panel
@@ -614,4 +615,5 @@
         self.plot_button = None
         self.notebook = None
+        self.list_plot_panels = {}
         self.layout_grid()
         self.layout_plotting_area()
@@ -678,7 +680,5 @@
         grid = self.notebook.GetPage(pos)
         title = self.notebook.GetPageText(pos)
-        
-        
-        group_id = wx.NewId()
+    
         for cell in grid.selected_cells:
             row, col = cell
@@ -697,7 +697,14 @@
                                  StatusEvent(status=msg, info="error")) 
                             return
+                        
                         if issubclass(new_plot.__class__, Data1D):
-                            new_plot.group_id = group_id
-                            new_plot.list_group_id .append(group_id)
+                            if label in self.list_plot_panels.keys():
+                                group_id = self.list_plot_panels[label]
+                            else:
+                                group_id = str(grid.uid) + str(new_plot.group_id)
+                                self.list_plot_panels[label] = group_id
+                            if group_id not in new_plot.list_group_id:
+                                new_plot.group_id = group_id
+                                new_plot.list_group_id.append(group_id)
                         else:
                             if label.lower() in ["data", "chi2"]:
@@ -710,7 +717,11 @@
                                     return  
                         wx.PostEvent(self.parent.parent, 
+                                     NewPlotEvent(action="clear",
+                                                  group_id=str(group_id),
+                                                  title=title))  
+                        wx.PostEvent(self.parent.parent, 
                                      NewPlotEvent(plot=new_plot, 
-                                  group_id=str(new_plot.group_id),
-                                   title =title))  
+                                                  group_id=str(group_id),
+                                                  title=title))  
                 else:
                    
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 18253cd0c7b469acac9b8c350c6b55afc464927a)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py	(revision fd51a7c88fc36ad61282a8ca37593afce2a8d43e)
@@ -164,5 +164,5 @@
         self.plots      = {}
         if self.is_zoomed:
-                self.is_zoomed = False
+            self.is_zoomed = False
         
     def _OnReSize(self, event):   
@@ -279,5 +279,5 @@
             if self.is_zoomed:
                 self.is_zoomed = False
-        
+      
           
     def draw_plot(self):
@@ -287,6 +287,4 @@
         self.draw()  
 
-
-       
     def onLeftDown(self,event): 
         """ 
Index: sansguiframe/src/sans/guiframe/local_perspectives/plotting/plotting.py
===================================================================
--- sansguiframe/src/sans/guiframe/local_perspectives/plotting/plotting.py	(revision 0f17dd9bd3972fc6af235d20c89b0ecc2a122c5a)
+++ sansguiframe/src/sans/guiframe/local_perspectives/plotting/plotting.py	(revision fd51a7c88fc36ad61282a8ca37593afce2a8d43e)
@@ -125,9 +125,10 @@
         if group_id in self.plot_panels.keys():
             panel = self.plot_panels[group_id]
+            for plottable in panel.graph.plottables.keys():
+                self.remove_plot(group_id, plottable.id)
             panel.graph.reset()
             return True
         return False
             
-        
     def hide_panel(self, group_id):
         """
@@ -275,14 +276,14 @@
             if group_id in self.plot_panels.keys():
                 #remove data from panel
-                if event.action.lower() == 'remove':
+                if event.action.lower().strip() == 'remove':
                     id = event.id
                     return self.remove_plot(group_id, id)
-                if event.action.lower() == 'hide':
+                if event.action.lower().strip() == 'hide':
                     return self.hide_panel(group_id)
-                if event.action.lower() == 'delete':
+                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() == "clear":
+                if event.action.lower().strip() == "clear":
                     return self.clear_panel_by_id(group_id)
         if not hasattr(event, 'plot'):    
