Index: trunk/gui/scripts/molvisviewer.tcl
===================================================================
--- trunk/gui/scripts/molvisviewer.tcl	(revision 3801)
+++ trunk/gui/scripts/molvisviewer.tcl	(revision 3803)
@@ -450,5 +450,5 @@
         -param          ""
     }
-    array set params $settings
+    array set params $options
 
     set pos [lsearch -exact $dataobj $_dlist]
Index: trunk/gui/scripts/resultviewer.tcl
===================================================================
--- trunk/gui/scripts/resultviewer.tcl	(revision 3801)
+++ trunk/gui/scripts/resultviewer.tcl	(revision 3803)
@@ -118,4 +118,7 @@
                 set slot [lindex $_dataslots $i]
                 foreach dobj $slot {
+                    if {"" != $_mode} {
+                        $_mode2widget($_mode) delete $dobj
+                    }
                     itcl::delete object $dobj
                 }
@@ -138,4 +141,7 @@
                 }
 
+                if {"" != $_mode} {
+                    $_mode2widget($_mode) delete $dobj
+                }
                 # destroy the object and forget it
                 itcl::delete object $dobj
Index: trunk/gui/scripts/xyresult.tcl
===================================================================
--- trunk/gui/scripts/xyresult.tcl	(revision 3801)
+++ trunk/gui/scripts/xyresult.tcl	(revision 3803)
@@ -1131,6 +1131,7 @@
             } else {
                 # Set the axis range from the entry values.
-                set min $_axisPopup($axis-min)
-                set max $_axisPopup($axis-max)
+                set label $_axisPopup(label)
+                set min $_axisPopup(${label}-min)
+                set max $_axisPopup(${label}-max)
                 $g axis configure $axis -min $min -max $max
             }
@@ -1158,5 +1159,6 @@
                 return
             }
-            set _axisPopup($axis-min) $min
+            set label $_axisPopup(label)
+            set _axisPopup(${label}-min) $min
         }
         "max" {
@@ -1168,5 +1170,6 @@
                 return
             }
-            set _axisPopup($axis-max) $max
+            set label $_axisPopup(label)
+            set _axisPopup(${label}-max) $max
         }
     }
@@ -1339,10 +1342,11 @@
     }
     set amin ""
-    if { [info exists _limits(${axis}${type}-min)] } {
-        set amin $_limits(${axis}${type}-min)
+    set label $_axisPopup(label)
+    if { [info exists _limits(${label}-min)] } {
+        set amin $_limits(${label}-min)
     }
     set amax ""
-    if { [info exists _limits(${axis}${type}-max)] } {
-        set amax $_limits(${axis}${type}-max)
+    if { [info exists _limits(${label}-max)] } {
+        set amax $_limits(${label}-max)
     }
     set auto 1 
@@ -1355,24 +1359,24 @@
     set _axisPopup(auto)  $_axisPopup($axis-auto)
     SetAxisRangeState $axis
-    if { ![info exists _axisPopup($axis-min)] } {
+    if { ![info exists _axisPopup(${label}-min)] } {
         if { $amin != "" } {
-            set _axisPopup($axis-min) $amin
-            set _axisPopup(min)   $_axisPopup($axis-min)
+            set _axisPopup(${label}-min) $amin
+            set _axisPopup(min)   $_axisPopup(${label}-min)
             SetAxis min
         } else {
-            set _axisPopup($axis-min) $min
-        }
-    }
-    if { ![info exists _axisPopup($axis-max)] } {
+            set _axisPopup(${label}-min) $min
+        }
+    }
+    if { ![info exists _axisPopup(${label}-max)] } {
         if { $amax != "" } {
-            set _axisPopup($axis-max) $amax
-            set _axisPopup(max)   $_axisPopup($axis-max)
+            set _axisPopup(${label}-max) $amax
+            set _axisPopup(max)   $_axisPopup(${label}-max)
             SetAxis max
         } else {
-            set _axisPopup($axis-max) $max
-        }
-    }
-    set _axisPopup(min)   $_axisPopup($axis-min)
-    set _axisPopup(max)   $_axisPopup($axis-max)
+            set _axisPopup(${label}-max) $max
+        }
+    }
+    set _axisPopup(min)  $_axisPopup(${label}-min)
+    set _axisPopup(max)  $_axisPopup(${label}-max)
     set _axisPopup(axis) $axis
 
@@ -1480,5 +1484,5 @@
             if { $min != "" && ( ![info exists _limits($tag)] || 
                                    $_limits($tag) > $min ) } {
-                set _limits(tag) $min
+                set _limits($tag) $min
             }
             set tag ${label}-max
