Index: mttroot/mtt/bin/trans/struc2gnuplot_txt2wish ================================================================== --- mttroot/mtt/bin/trans/struc2gnuplot_txt2wish +++ mttroot/mtt/bin/trans/struc2gnuplot_txt2wish @@ -45,13 +45,13 @@ .menubar.edit.menu.axes add command -label "Cartesian" -underline 0 -command { puts "set nopolar ; replot" } .menubar.edit.menu.axes add command -label "Polar" -underline 0 -command { puts "set polar ; replot" } .menubar.edit.menu.axes add cascade -label "Ranges" -underline 0 -menu .menubar.edit.menu.axes.range menu .menubar.edit.menu.axes.range -.menubar.edit.menu.axes.range add command -label "Set X" -underline 4 -command { puts "set xrange \[[get_value "X axis range? min:max" "*:*"]\]" } -.menubar.edit.menu.axes.range add command -label "Set Y" -underline 4 -command { puts "set yrange \[[get_value "Y axis range? min:max" "*:*"]\]" } -.menubar.edit.menu.axes.range add command -label "Set Z" -underline 4 -command { puts "set zrange \[[get_value "Z axis range? min:max" "*:*"]\]" } +.menubar.edit.menu.axes.range add command -label "Set X" -underline 4 -command { puts "set xrange \[[get_value "X axis range? min:max" "*:*"]\] ; replot" } +.menubar.edit.menu.axes.range add command -label "Set Y" -underline 4 -command { puts "set yrange \[[get_value "Y axis range? min:max" "*:*"]\] ; replot" } +.menubar.edit.menu.axes.range add command -label "Set Z" -underline 4 -command { puts "set zrange \[[get_value "Z axis range? min:max" "*:*"]\] ; replot" } menu .menubar.edit.menu.contour .menubar.edit.menu.contour add command -label "Show Contour" -underline 0 -command { puts "set dgrid3d ; set contour ; replot" } .menubar.edit.menu.contour add command -label "Hide Contour" -underline 0 -command { puts "set nodgrid3d ; set nocontour ; replot" } .menubar.edit.menu.contour add cascade -label "Surface" -underline 0 -menu .menubar.edit.menu.contour.surface @@ -161,13 +161,14 @@ # rotation bar canvas .rotationbar scale .rotationbar.xrot -label "Rotate X" -orient h -from "0" -to "180" -command { do_rotate_3d "xrot" } scale .rotationbar.zrot -label "Rotate Z" -orient h -from "0" -to "360" -command { do_rotate_3d "zrot" } pack .rotationbar.xrot -side left -pack .rotationbar.zrot -side right +pack .rotationbar.zrot -side left .rotationbar.xrot set 30 .rotationbar.zrot set 60 + pack .rotationbar -expand false -fill x -side bottom proc "enable_rotationbar" "" { } proc "disable_rotationbar" "" { @@ -270,10 +271,11 @@ cat <> ${out} } } proc "plot" "title" { + global dimension global select global view global xcolumn global ycolumn global zcolumn @@ -298,10 +300,11 @@ set ytitle \$title } "Select Z" { set zcolumn \$column set ztitle \$title + set dimension "3D" } } plot_var } @@ -447,10 +450,15 @@ } entry .f.entry label .f.label -text "\$string" .f.entry insert 0 "\$initial" + bind .f.entry <> { + set get_value_status "ok" + set get_value_retval [.f.entry get ] + destroy .f + } pack .f.buttons.ok -side left -expand false pack .f.buttons.cancel -side left -expand false pack .f.label -side top -expand false pack .f.entry -side top -expand false @@ -496,17 +504,20 @@ } } proc "do_rotate_3d" "var val" { switch -- \$var { - xrot { puts "set view \$val,,, ; replot" } - zrot { puts "set view ,\$val,, ; replot" } - scale { puts "set view ,,[expr pow(2,\$val)], ; replot" } - zscale { puts "set view ,,,[expr pow(2,\$val)] ; replot" } + xrot { + puts "set view \$val,,, ; replot" + } + zrot { + puts "set view ,\$val,, ; replot" + } } } +event add <> # Defaults set parameter "" set windownum 0 set view outputs