Index: mttroot/mtt/bin/trans/struc2gnuplot_txt2wish ================================================================== --- mttroot/mtt/bin/trans/struc2gnuplot_txt2wish +++ mttroot/mtt/bin/trans/struc2gnuplot_txt2wish @@ -18,10 +18,11 @@ exec wish "\$0" "\$@" ## main window wm title . "MTT Viewer: ${sys}" set parameter "" +set windownum 0 # menu bar canvas .menubar menubutton .menubar.file -text "File" -menu .menubar.file.menu @@ -169,16 +170,20 @@ proc "plot_var" "title column" { set_plot_options puts "set term X11" global plottype if {"\$plottype" == "Multi Plot"} { - puts "replot '${dat2}' using 1:\$column title '\$title' with lines" + set plot "replot" } elseif {"\$plottype" == "New Window"} { - puts "! echo \"plot '${dat2}' using 1:\$column title '\$title' with lines\" | gnuplot -geometry 400x300 -persist" + global windownum + set windownum [ expr \$windownum + 1 ] + puts "set terminal x11 \$windownum" + set plot "plot" } else { - puts "plot '${dat2}' using 1:\$column title '\$title' with lines" + set plot "plot" } + puts "\$plot '${dat2}' using 1:\$column title '\$title' with lines" } proc "set_plot_options" "" { global coord; # "Cartesian", "Polar" global grid; # "Grid On", "Grid Off"