Index: guiframe/data_panel.py
===================================================================
--- guiframe/data_panel.py	(revision 1b1bbf9e33cd9b1a3338d3a449f2a011094f2f38)
+++ guiframe/data_panel.py	(revision 0a2fdcada44ebea065d64537d165214e00ebc92b)
@@ -255,8 +255,20 @@
         wx.EVT_BUTTON(self, self.bt_remove.GetId(), self.on_remove)
         
-        self.tctrl_perspective = wx.StaticText(self, -1, 'No Active Application')
+        self.tctrl_perspective = wx.StaticText(self, -1, 
+                            'No Active Application',
+                        style=wx.SUNKEN_BORDER|wx.ALIGN_LEFT)
         self.tctrl_perspective.SetToolTipString("Active Application")
-        self.tctrl_plotpanel = wx.StaticText(self, -1, 'No Plot panel on focus')
-        self.tctrl_plotpanel.SetToolTipString("Active Plot Panel")
+        perspective_font = self.tctrl_perspective.GetFont()
+        perspective_font.SetWeight(wx.BOLD)
+        self.tctrl_perspective.SetFont(perspective_font)
+        self.tctrl_perspective.SetClientSize((80,20))
+        self.cb_plotpanel = wx.ComboBox(self, -1, 
+                                style=wx.CB_READONLY|wx.CB_SORT)
+        wx.EVT_COMBOBOX(self.cb_plotpanel,-1, self._on_plot_selection)
+        self.cb_plotpanel.Append('None')
+        self.cb_plotpanel.SetStringSelection('None')
+
+        #self.tctrl_plotpanel = wx.StaticText(self, -1, 'No Plot panel on focus')
+        #self.tctrl_plotpanel.SetToolTipString("Active Plot Panel")
     
         ix = 0
@@ -272,5 +284,5 @@
                              wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix += 1
-        self.sizer3.Add(self.tctrl_plotpanel,(iy, ix),(1,1),
+        self.sizer3.Add(self.cb_plotpanel,(iy, ix),(1,1),
                           wx.EXPAND|wx.ADJUST_MINSIZE, 0)  
         ix = 0          
@@ -624,4 +636,5 @@
         append plot to plot panel on focus
         """
+        self._on_plot_selection()
         data_id, theory_id, state_id = self.set_data_helper()
         self.parent.plot_data(data_id=data_id,  
@@ -662,4 +675,7 @@
         """
         self.tctrl_perspective.SetLabel(str(name))
+        #perspective_font = self.tctrl_perspective.GetFont()
+        #perspective_font.SetWeight(wx.BOLD)
+        self.tctrl_perspective.SetClientSize((80,20))#SetFont(perspective_font)
      
     def set_panel_on_focus(self, name):
@@ -667,6 +683,26 @@
         set the plot panel on focus
         """
-        self.tctrl_plotpanel.SetLabel(str(name))
+        for key, value in self.parent.plot_panels.iteritems():
+            name_plot_panel = str(value.window_caption)
+            if name_plot_panel not in self.cb_plotpanel.GetItems():
+                self.cb_plotpanel.Append(name_plot_panel, value)
+            self.cb_plotpanel.SetStringSelection(name_plot_panel)
+
  
+    def _on_plot_selection(self, event = None):
+        """
+        On source combobox selection
+        """
+        if event != None:
+            combo = event.GetEventObject()
+            event.Skip()
+        else:
+            combo = self.cb_plotpanel
+        selection = combo.GetSelection()
+
+        if combo.GetValue() != 'None':
+            panel = combo.GetClientData(selection)
+            self.parent.on_set_plot_focus(panel)   
+
     
 
Index: guiframe/gui_manager.py
===================================================================
--- guiframe/gui_manager.py	(revision f69b5830c14ebd90d095140cf048b1c5936e9dbf)
+++ guiframe/gui_manager.py	(revision 0a2fdcada44ebea065d64537d165214e00ebc92b)
@@ -144,4 +144,6 @@
         ## List of panels
         self.panels = {}
+        # List of plot panels
+        self.plot_panels = {}
 
         # Default locations
@@ -152,4 +154,6 @@
         #panel on focus
         self.panel_on_focus = None
+        #control_panel on focus
+        self.cpanel_on_focus = None
         self.loader = Loader()   
         #data manager
@@ -199,5 +203,6 @@
         update edit menu if available
         """
-        self.panel_on_focus = event.panel
+        if event != None:
+            self.panel_on_focus = event.panel
         panel_name = 'No panel on focus'
         application_name = 'No Selected Application'
@@ -209,9 +214,16 @@
             if self._data_panel is not None:
                 panel_name = self.panel_on_focus.window_caption
-                self._data_panel.set_panel_on_focus(panel_name)
+                self._data_panel.set_panel_on_focus(ID)#panel_name)
+                #update combo
+                if self.panel_on_focus in self.plot_panels.values():
+                    self._data_panel.cb_plotpanel.SetStringSelection(str\
+                                         (self.panel_on_focus.window_caption))
+                elif self.panel_on_focus != self._data_panel:
+                    self.cpanel_on_focus = self.panel_on_focus
                 #update toolbar
                 self._update_toolbar_helper()
                 #update edit menu
                 self.enable_edit_menu()
+
 
     def build_gui(self):
@@ -612,5 +624,12 @@
         # Register for showing/hiding the panel
         wx.EVT_MENU(self, ID, self._on_view)
-        
+        if p not in self.plot_panels.values():
+            self.plot_panels[ID] = p
+            if self._data_panel is not None and \
+                self._plotting_plugin is not None:
+                ind = self._data_panel.cb_plotpanel.FindString('None')
+                if ind != wx.NOT_FOUND:
+                    self._data_panel.cb_plotpanel.Delete(ind)
+                self._data_panel.cb_plotpanel.Append(str(caption), p)
         self._mgr.Update()
         return ID
@@ -649,9 +668,9 @@
         if self._toolbar is  None:
             return
-        self._toolbar.update_toolbar(self.panel_on_focus)
+        self._toolbar.update_toolbar(self.cpanel_on_focus)
         if self._current_perspective is not None:
             application_name = self._current_perspective.sub_menu
-        if self.panel_on_focus is not None:
-            panel_name = self.panel_on_focus.window_caption
+        if self.cpanel_on_focus is not None:
+            panel_name = self.cpanel_on_focus.window_caption
         self._toolbar.update_button(application_name=application_name, 
                                         panel_name=panel_name)
@@ -1037,12 +1056,16 @@
         """
         ID = str(uid)
+        caption = self.panels[ID].window_caption
         config.printEVT("hide_panel: %s" % ID)
         if ID in self.panels.keys():
             if self._mgr.GetPane(self.panels[ID].window_name).IsShown():
                 self._mgr.GetPane(self.panels[ID].window_name).Hide()
+                if self._data_panel is not None and \
+                            ID in self.plot_panels.keys():
+                    self._data_panel.cb_plotpanel.Append(str(caption), p)
                 # Hide default panel
                 self._mgr.GetPane(self.panels["default"].window_name).Hide()
             self._mgr.Update()
-            
+                
     def delete_panel(self, uid):
         """
@@ -1051,5 +1074,5 @@
         ID = str(uid)
         config.printEVT("delete_panel: %s" % ID)
-        
+        caption = self.panels[ID].window_caption
         if ID in self.panels.keys():
             panel = self.panels[ID]
@@ -1058,4 +1081,9 @@
             panel.Destroy()
             del self.panels[ID]
+            del self.plot_panels[ID]
+            if self._data_panel is not None:
+                ind = self._data_panel.cb_plotpanel.FindString(str(caption))
+                if ind != wx.NOT_FOUND:
+                    self._data_panel.cb_plotpanel.Delete(ind)
             self._mgr.Update()
       
@@ -1142,4 +1170,5 @@
                         plug.clear_panel()  
             self.panel_on_focus = None    
+            self.cpanel_on_focus = None 
             self.get_data(path)
         if self.defaultPanel is not None and \
@@ -1224,6 +1253,6 @@
         save the state of the current active application
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_save(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_save(event)
             
     def _on_save_project(self, event):
@@ -1488,5 +1517,5 @@
             self.on_close_welcome_panel()
        
-    def set_data(self, data_id): 
+    def set_data(self, data_id, theory_id=None): 
         """
         set data to current perspective
@@ -1680,4 +1709,5 @@
         Enable append data on a plot panel
         """
+
         if self.panel_on_focus not in self._plotting_plugin.plot_panels.values():
             return
@@ -1686,4 +1716,5 @@
             
         is_data2d = hasattr(new_plot, 'data')
+        
         is_data1d = self.panel_on_focus.__class__.__name__ == "ModelPanel1D"\
             and self.panel_on_focus.group_id is not None
@@ -1703,14 +1734,14 @@
         enable menu item under edit menu depending on the panel on focus
         """
-        if self.panel_on_focus is not None and self._edit_menu is not None:
-            flag = self.panel_on_focus.get_undo_flag()
+        if self.cpanel_on_focus is not None and self._edit_menu is not None:
+            flag = self.cpanel_on_focus.get_undo_flag()
             self._edit_menu.Enable(GUIFRAME_ID.UNDO_ID, flag)
-            flag = self.panel_on_focus.get_redo_flag()
+            flag = self.cpanel_on_focus.get_redo_flag()
             self._edit_menu.Enable(GUIFRAME_ID.REDO_ID, flag)
-            flag = self.panel_on_focus.get_print_flag()
+            flag = self.cpanel_on_focus.get_print_flag()
             self._edit_menu.Enable(GUIFRAME_ID.PRINT_ID, flag)
-            flag = self.panel_on_focus.get_preview_flag()
+            flag = self.cpanel_on_focus.get_preview_flag()
             self._edit_menu.Enable(GUIFRAME_ID.PREVIEW_ID, flag)
-            flag = self.panel_on_focus.get_reset_flag()
+            flag = self.cpanel_on_focus.get_reset_flag()
             self._edit_menu.Enable(GUIFRAME_ID.RESET_ID, flag)
         else:
@@ -1726,6 +1757,6 @@
         undo previous action of the last panel on focus if possible
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_undo(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_undo(event)
             
     def on_redo_panel(self, event=None):
@@ -1733,6 +1764,6 @@
         redo the last cancel action done on the last panel on focus
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_redo(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_redo(event)
             
     def on_bookmark_panel(self, event=None):
@@ -1740,6 +1771,6 @@
         bookmark panel
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_bookmark(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_bookmark(event)
             
     def append_bookmark(self, event=None):
@@ -1753,6 +1784,6 @@
         save possible information on the current panel
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_save(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_save(event)
             
     def on_preview_panel(self, event=None):
@@ -1760,6 +1791,6 @@
         preview information on the panel on focus
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_preview(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_preview(event)
             
     def on_print_panel(self, event=None):
@@ -1767,6 +1798,6 @@
         print available information on the last panel on focus
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_print(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_print(event)
             
     def on_zoom_panel(self, event=None):
@@ -1774,6 +1805,6 @@
         zoom on the current panel if possible
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_zoom(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_zoom(event)
             
     def on_zoom_in_panel(self, event=None):
@@ -1781,6 +1812,6 @@
         zoom in of the panel on focus
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_zoom_in(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_zoom_in(event)
             
     def on_zoom_out_panel(self, event=None):
@@ -1788,6 +1819,6 @@
         zoom out on the panel on focus
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_zoom_out(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_zoom_out(event)
             
     def on_drag_panel(self, event=None):
@@ -1795,6 +1826,6 @@
         drag apply to the panel on focus
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_drag(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_drag(event)
             
     def on_reset_panel(self, event=None):
@@ -1802,6 +1833,6 @@
         reset the current panel
         """
-        if self.panel_on_focus is not None:
-            self.panel_on_focus.on_reset(event)
+        if self.cpanel_on_focus is not None:
+            self.cpanel_on_focus.on_reset(event)
             
     def enable_undo(self):
@@ -1809,6 +1840,6 @@
         enable undo related control
         """
-        if self.panel_on_focus is not None:
-            self._toolbar.enable_undo(self.panel_on_focus)
+        if self.cpanel_on_focus is not None:
+            self._toolbar.enable_undo(self.cpanel_on_focus)
             
     def enable_redo(self):
@@ -1816,6 +1847,6 @@
         enable redo 
         """
-        if self.panel_on_focus is not None:
-            self._toolbar.enable_redo(self.panel_on_focus)
+        if self.cpanel_on_focus is not None:
+            self._toolbar.enable_redo(self.cpanel_on_focus)
             
     def enable_bookmark(self):
@@ -1823,6 +1854,6 @@
         Bookmark 
         """
-        if self.panel_on_focus is not None:
-            self._toolbar.enable_bookmark(self.panel_on_focus)
+        if self.cpanel_on_focus is not None:
+            self._toolbar.enable_bookmark(self.cpanel_on_focus)
             
     def enable_save(self):
@@ -1830,6 +1861,6 @@
         save 
         """
-        if self.panel_on_focus is not None:
-            self._toolbar.enable_save(self.panel_on_focus)
+        if self.cpanel_on_focus is not None:
+            self._toolbar.enable_save(self.cpanel_on_focus)
             
     def enable_preview(self):
@@ -1837,6 +1868,6 @@
         preview 
         """
-        if self.panel_on_focus is not None:
-            self._toolbar.enable_preview(self.panel_on_focus)
+        if self.cpanel_on_focus is not None:
+            self._toolbar.enable_preview(self.cpanel_on_focus)
             
     def enable_print(self):
@@ -1844,6 +1875,6 @@
         print 
         """
-        if self.panel_on_focus is not None:
-            self._toolbar.enable_print(self.panel_on_focus)
+        if self.cpanel_on_focus is not None:
+            self._toolbar.enable_print(self.cpanel_on_focus)
             
     def enable_zoom(self):
@@ -1851,5 +1882,5 @@
         zoom 
         """
-        if self.panel_on_focus is not None:
+        if self.cpanel_on_focus is not None:
             self._toolbar.enable_zoom(self.panel_on_focus)
             
@@ -1858,5 +1889,5 @@
         zoom in 
         """
-        if self.panel_on_focus is not None:
+        if self.cpanel_on_focus is not None:
             self._toolbar.enable_zoom_in(self.panel_on_focus)
             
@@ -1865,5 +1896,5 @@
         zoom out 
         """
-        if self.panel_on_focus is not None:
+        if self.cpanel_on_focus is not None:
             self._toolbar.enable_zoom_out(self.panel_on_focus)
             
@@ -1872,5 +1903,5 @@
         drag 
         """
-        if self.panel_on_focus is not None:
+        if self.cpanel_on_focus is not None:
             self._toolbar.enable_drag(self.panel_on_focus)
             
@@ -1879,5 +1910,5 @@
         reset the current panel
         """
-        if self.panel_on_focus is not None:
+        if self.cpanel_on_focus is not None:
             self._toolbar.enable_reset(self.panel_on_focus)
 
@@ -1967,5 +1998,17 @@
         return self.schedule
     
-        
+    def on_set_plot_focus(self, panel):
+        """
+        Set focus on a plot panel
+        """
+        for plot in self.plot_panels.values():
+            # make sure we don't double focus
+            if panel != plot:
+                plot.on_kill_focus(None)
+        panel.on_set_focus(None)  
+        # set focusing panel
+        self.panel_on_focus = panel  
+        self.set_panel_on_focus(None)
+         
     def _onDrawIdle(self, *args, **kwargs):
         """
Index: guiframe/panel_base.py
===================================================================
--- guiframe/panel_base.py	(revision f69b5830c14ebd90d095140cf048b1c5936e9dbf)
+++ guiframe/panel_base.py	(revision 0a2fdcada44ebea065d64537d165214e00ebc92b)
@@ -71,5 +71,5 @@
         self._print_flag = flag
         if self._manager is not None and self._manager.parent is not None:
-            self._manager.parent.panel_on_focus = self
+            self._manager.parent.cpanel_on_focus = self
             self._manager.parent.enable_print()
      
@@ -91,5 +91,5 @@
         self._undo_flag = flag
         if self._manager is not None and self._manager.parent is not None:
-            self._manager.parent.panel_on_focus = self
+            self._manager.parent.cpanel_on_focus = self
             self._manager.parent.enable_undo()
       
@@ -111,5 +111,5 @@
         self._redo_flag = flag
         if self._manager is not None and self._manager.parent is not None:
-            self._manager.parent.panel_on_focus = self
+            self._manager.parent.cpanel_on_focus = self
             self._manager.parent.enable_redo()
       
@@ -131,5 +131,5 @@
         self._zoom_in_flag = flag
         if self._manager is not None and self._manager.parent is not None:
-            self._manager.parent.panel_on_focus = self
+            self._manager.parent.cpanel_on_focus = self
             self._manager.parent.enable_zoom_in()
        
@@ -171,5 +171,5 @@
         self._zoom_flag = flag
         if self._manager is not None and self._manager.parent is not None:
-            self._manager.parent.panel_on_focus = self
+            self._manager.parent.cpanel_on_focus = self
             self._manager.parent.enable_zoom()
      
@@ -191,5 +191,5 @@
         self._bookmark_flag = flag
         if self._manager is not None and self._manager.parent is not None:
-            self._manager.parent.panel_on_focus = self
+            self._manager.parent.cpanel_on_focus = self
             self._manager.parent.enable_bookmark()
        
@@ -211,5 +211,5 @@
         self._preview_flag = flag
         if self._manager is not None and self._manager.parent is not None:
-            self._manager.parent.panel_on_focus = self
+            self._manager.parent.cpanel_on_focus = self
             self._manager.parent.enable_preview()
        
@@ -231,5 +231,5 @@
         self._save_flag = flag
         if self._manager is not None and self._manager.parent is not None:
-            self._manager.parent.panel_on_focus = self
+            self._manager.parent.cpanel_on_focus = self
             self._manager.parent.enable_save()
 
@@ -251,5 +251,5 @@
         self._drag_flag = flag
         if self._manager is not None and self._manager.parent is not None:
-            self._manager.parent.panel_on_focus = self
+            self._manager.parent.cpanel_on_focus = self
             self._manager.parent.enable_drag()
        
@@ -271,5 +271,5 @@
         self._reset_flag = flag
         if self._manager is not None and self._manager.parent is not None:
-            self._manager.parent.panel_on_focus = self
+            self._manager.parent.cpanel_on_focus = self
             self._manager.parent.enable_reset()
       
