Index: guiframe/gui_manager.py
===================================================================
--- guiframe/gui_manager.py	(revision 0286321f19ded2f129e0ce7eb89d0fdd00b1efda)
+++ guiframe/gui_manager.py	(revision f2d9e76d9fd6b0d79d817265c7fa371e0cd9dd97)
@@ -93,4 +93,5 @@
     GUIFRAME_HEIGHT = custom_config.GUIFRAME_HEIGHT
     DEFAULT_PERSPECTIVE = custom_config.DEFAULT_PERSPECTIVE
+    CLEANUP_PLOT = custom_config.CLEANUP_PLOT
 except:
     DATALOADER_SHOW = True
@@ -103,7 +104,7 @@
     GUIFRAME_HEIGHT = config.GUIFRAME_HEIGHT
     DEFAULT_PERSPECTIVE = None
+    CLEANUP_PLOT = False
 
 DEFAULT_STYLE = config.DEFAULT_STYLE
-
 
 
@@ -190,4 +191,8 @@
         #tool bar
         self._toolbar = None
+        # number of plugins
+        self._num_perspectives = 0
+        # plot duck cleanup option
+        self.cleanup_plots = CLEANUP_PLOT
         # (un)-focus color
         #self.color = '#b3b3b3'
@@ -371,4 +376,6 @@
         # Set up the layout
         self._setup_layout()
+        # Set up extra custom tool menu
+        self._setup_extra_custom()
         # Set up the menu
         self._setup_menus()
@@ -386,5 +393,12 @@
         # Set Custom default
         self.set_custom_default_perspective()
-
+  
+        #self.Show(True)
+        #self._check_update(None)
+    
+    def _setup_extra_custom(self):  
+        """
+        Set up toolbar and welcome view if needed
+        """
         style = self.__gui_style & GUIFRAME.TOOLBAR_ON
         if (style == GUIFRAME.TOOLBAR_ON) & (not self._toolbar.IsShown()):
@@ -395,8 +409,5 @@
         if welcome_style == GUIFRAME.WELCOME_PANEL_ON:
             self.show_welcome_panel(None)
-  
-        #self.Show(True)
-        #self._check_update(None)
-             
+      
     def _setup_layout(self):
         """
@@ -444,4 +455,5 @@
         exist.
         """
+        self._num_perspectives += 1
         is_loaded = False
         for item in self.plugins:
@@ -543,5 +555,6 @@
             # Should raise and catch at a higher level and 
             # display error on status bar
-            pass   
+            pass  
+
         return plugins
     
@@ -1014,11 +1027,30 @@
             preferences_menu = wx.Menu()
             hint = "All plot panels will floating"
-            preferences_menu.Append(id, '&Float', hint)
+            preferences_menu.AppendRadioItem(id, '&Float All', hint)
             wx.EVT_MENU(self, id, self.set_plotpanel_floating)
+            style = self.__gui_style & GUIFRAME.FLOATING_PANEL
+            f_menu = preferences_menu.FindItemById(id)
+            if style == GUIFRAME.FLOATING_PANEL: 
+                f_checked = True
+            else:
+                f_checked = False
+            f_menu.Check(f_checked)
+
             id = wx.NewId()
             hint = "All plot panels will displayed within the frame"
-            preferences_menu.Append(id, '&Dock', hint)
-            wx.EVT_MENU(self, id, self.set_plotpanel_fixed)
-
+            preferences_menu.AppendRadioItem(id, '&Dock All', hint)
+            wx.EVT_MENU(self, id, self.set_plotpanel_fixed) 
+            if not f_checked:
+                d_menu = preferences_menu.FindItemById(id)
+                d_menu.Check(True)
+            preferences_menu.AppendSeparator()
+            id = wx.NewId()
+            hint = "Clean up the dock area for plots on new-plot"
+            preferences_menu.AppendCheckItem(id, '&CleanUp Dock on NewPlot', hint)
+            wx.EVT_MENU(self, id, self.on_cleanup_dock)
+            flag = self.cleanup_plots
+            if self.cleanup_plots:
+                c_menu = preferences_menu.FindItemById(id)
+                c_menu.Check(True)  
             self._window_menu.AppendSubMenu(preferences_menu,'&Preferences')
         if self._window_menu.GetMenuItemCount() == 0:
@@ -1044,4 +1076,5 @@
                 self._menubar.Append(self._window_menu, '&Window')
                 """
+
                 
     def _add_menu_application(self):
@@ -1052,6 +1085,7 @@
         add menu application
         """
-        style = self.__gui_style & GUIFRAME.MULTIPLE_APPLICATIONS
-        if style == GUIFRAME.MULTIPLE_APPLICATIONS:
+        #style = self.__gui_style & GUIFRAME.MULTIPLE_APPLICATIONS
+        #if style == GUIFRAME.MULTIPLE_APPLICATIONS:
+        if self._num_perspectives  > 1:
             plug_data_count = False
             plug_no_data_count = False
@@ -1105,5 +1139,5 @@
         
         id = wx.NewId()
-        hint_load_file = "read all analysis states save previously"
+        hint_load_file = "read all analysis states saved previously"
         self._save_appl_menu = self._file_menu.Append(id, 
                                 '&Open Project', hint_load_file)
@@ -1285,5 +1319,5 @@
     def hide_panel(self, uid):
         """
-        hide panel
+        hide panel except default panel
         """
         ID = str(uid)
@@ -1296,6 +1330,6 @@
                             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()
+                # Do not Hide default panel here...
+                #self._mgr.GetPane(self.panels["default"].window_name).Hide()
             self._mgr.Update()
                 
@@ -1811,10 +1845,11 @@
         list_data, _ = self._data_manager.get_by_id(data_id)
         if self._current_perspective is not None:
-            for uid, panel in self.plot_panels.iteritems() :
-                #panel = self.plot_panels[uid]
-                window = self._mgr.GetPane(panel.window_name)
-                # To hide all docked plot panels when set the data
-                #if not window.IsFloating():
-                #    self.hide_panel(uid)
+            if self.cleanup_plots:
+                for uid, panel in self.plot_panels.iteritems():
+                    #panel = self.plot_panels[uid]
+                    window = self._mgr.GetPane(panel.window_name)
+                    # To hide all docked plot panels when set the data
+                    if not window.IsFloating():
+                        self.hide_panel(uid)
             self._current_perspective.set_data(list_data.values())
             self.on_close_welcome_panel()
@@ -1870,4 +1905,10 @@
                                                    info='warning'))
             else:
+                if self.cleanup_plots:
+                    for id, panel in self.plot_panels.iteritems():
+                        window = self._mgr.GetPane(panel.window_name)
+                        # To hide all docked plot panels when set the data
+                        if not window.IsFloating():
+                            self.hide_panel(id)
                 #if not append then new plot
                 from sans.guiframe.dataFitting import Data2D
@@ -1975,9 +2016,12 @@
         self.__gui_style |= GUIFRAME.FLOATING_PANEL
         plot_panel = []
+        id = event.GetId()
+        menu = self._window_menu.FindItemById(id)
         if self._plotting_plugin is not None:
             plot_panel = self._plotting_plugin.plot_panels.values()
             for p in plot_panel:
                 self._popup_floating_panel(p)
-        
+            menu.Check(True)
+            
     def set_plotpanel_fixed(self, event=None):
         """
@@ -1987,9 +2031,32 @@
         self.__gui_style |= GUIFRAME.FIXED_PANEL
         plot_panel = []
+        id = event.GetId()
+        menu = self._window_menu.FindItemById(id)
         if self._plotting_plugin is not None:
             plot_panel = self._plotting_plugin.plot_panels.values()
             for p in plot_panel:
                 self._popup_fixed_panel(p)
-                    
+            menu.Check(True)
+            
+    def on_cleanup_dock(self, event=None):     
+        """
+        Set Cleanup Dock option
+        """
+        if event == None:
+            return
+        id = event.GetId()
+        menu = self._window_menu.FindItemById(id)
+        Flag = self.cleanup_plots
+        if not Flag:
+            menu.Check(True)
+            self.cleanup_plots = True
+            msg = "Cleanup-Dock option set to 'ON'."
+        else:
+            menu.Check(False)
+            self.cleanup_plots = False
+            msg = "Cleanup-Dock option set to 'OFF'."
+
+        wx.PostEvent(self, StatusEvent(status= msg))
+         
     def _popup_fixed_panel(self, p):
         """
Index: guiframe/startup_configuration.py
===================================================================
--- guiframe/startup_configuration.py	(revision 9d8f1939d4887ca99daa457dc891150cfd75dfe5)
+++ guiframe/startup_configuration.py	(revision f2d9e76d9fd6b0d79d817265c7fa371e0cd9dd97)
@@ -25,4 +25,5 @@
                    'FIXED_PANEL':True,
                    'WELCOME_PANEL_SHOW':False,
+                   'CLEANUP_PLOT':False,
                    'DEFAULT_PERSPECTIVE':'Fitting'}
 
@@ -65,8 +66,8 @@
         current_bt.SetValue(False)
         current_bt.Bind(wx.EVT_RADIOBUTTON, self.OnCurrent)
-        msg = "\nThis new configuration will take effect after\n"
-        msg += "restarting this application..."
+        msg = "\nThis new selection will take effect after\n"
+        msg += "restarting the SansView application..."
         note_txt = wx.StaticText(panel, -1, msg, (15, 75))
-        
+        note_txt.SetForegroundColour("red")
         hbox = wx.BoxSizer(wx.HORIZONTAL)
         cancelButton = wx.Button(self, -1, 'Cancel', size=(70, 25))
@@ -104,6 +105,8 @@
             p_size = None
             for panel in self.parent.plot_panels.values():
-                if p_size == None or panel.size > p_size:
-                    p_size = panel.size
+                p_panel = self.parent._mgr.GetPane(panel.window_name)
+                if p_panel.IsShown():
+                    if p_size == None or panel.size > p_size:
+                        p_size = panel.size
             if p_size == None:
                 p_size = DEFAULT_STRINGS['PLOPANEL_WIDTH']
@@ -136,5 +139,6 @@
             else:
                 self.current_string['WELCOME_PANEL_SHOW'] = False
-            
+            self.current_string['CLEANUP_PLOT'] = \
+                                        self.parent.cleanup_plots
             perspective = self.parent.get_current_perspective()
             self.current_string['DEFAULT_PERSPECTIVE'] = str(perspective.sub_menu)
Index: sansview/custom_config.py
===================================================================
--- sansview/custom_config.py	(revision adf44c254b67e1c8c055878d09f38a535dfc51b0)
+++ sansview/custom_config.py	(revision f2d9e76d9fd6b0d79d817265c7fa371e0cd9dd97)
@@ -6,4 +6,5 @@
 GUIFRAME_HEIGHT = 840
 GUIFRAME_WIDTH = 1150
+CLEANUP_PLOT = False
 WELCOME_PANEL_SHOW = False
 TOOLBAR_SHOW = True
Index: sansview/local_config.py
===================================================================
--- sansview/local_config.py	(revision adf44c254b67e1c8c055878d09f38a535dfc51b0)
+++ sansview/local_config.py	(revision f2d9e76d9fd6b0d79d817265c7fa371e0cd9dd97)
@@ -7,5 +7,5 @@
 # Version of the application
 __appname__ = "SansView"
-__version__ = '1.9_RC_2'
+__version__ = '1.9_RC_3'
 __download_page__ = 'http://danse.chem.utk.edu'
 __update_URL__ = 'http://danse.chem.utk.edu/sansview_version.php'
@@ -67,4 +67,5 @@
 SS_MAX_DISPLAY_TIME = 5000 #5 sec
 WELCOME_PANEL_SHOW = False
+CLEANUP_PLOT = False
 SetupIconFile_win = os.path.join("images", "ball.ico")
 SetupIconFile_mac = os.path.join("images", "ball.icns")
