Index: mttroot/mtt/bin/trans/struc2gnuplot_txt2wish ================================================================== --- mttroot/mtt/bin/trans/struc2gnuplot_txt2wish +++ mttroot/mtt/bin/trans/struc2gnuplot_txt2wish @@ -16,11 +16,11 @@ #!/bin/sh # -*-tcl-*- Next line replaces shell with wish\\ exec wish "\$0" "\$@" ## main window -wm title . "MTT Viewer: ${sys}" +wm title . "MTT: ${sys}" # menu bar canvas .menubar menubutton .menubar.file -text "File" -underline 0 -menu .menubar.file.menu @@ -233,15 +233,21 @@ EOF ## create states and outputs lists gawk ' ($1 == "state") { - printf "lappend xl %s\n", $4 + name=sys"__"; + label=$4; + sub (name, "", label); + printf "lappend xl %s\n", label } ($1 == "output") { - printf "lappend yl %s\n", $4 -}' ${struc} >> ${out} + name=sys"__"; + label=$4; + sub (name, "", label); + printf "lappend yl %s\n", label +}' sys=${sys} ${struc} >> ${out} cat <> ${out} lappend xl Time lappend yl Time .parameters.list configure -listvar yl @@ -259,13 +265,16 @@ proc "get_state_column" "title" { switch -- \$title { EOF gawk '($1 == "state") { - printf "\t\t%s\t{ return %d }\n", $4, $2+2+Ny; + name=sys"__"; + label=$4; + sub (name, "", label); + printf "\t\t%s\t{ return %d }\n", label, $2+2+Ny; } - ' Ny=${Ny} ${struc} >> ${out} + ' Ny=${Ny} sys=${sys} ${struc} >> ${out} cat <> ${out} } } @@ -272,13 +281,16 @@ proc "get_output_column" "title" { switch -- \$title { EOF gawk '($1 == "output") { - printf "\t\t%s\t{ return %d }\n", $4, $2+1; + name=sys"__"; + label=$4; + sub (name, "", label); + printf "\t\t%s\t{ return %d }\n", label, $2+1; } - ' Title=\$title Ny=${Ny} ${struc} >> ${out} + ' Ny=${Ny} sys=${sys} ${struc} >> ${out} cat <> ${out} } }