Differences From Artifact [81550f7f79]:

To Artifact [0b8b18566d]:


16
17
18
19
20
21
22

23
24
25
26
27
28
29
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30







+







#!/bin/sh
# Next line replaces shell with wish\\
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
menu .menubar.file.menu
.menubar.file.menu add command -label "Open  (Gnuplot plot file)"    -command open_plotfile
167
168
169
170
171
172
173
174

175
176




177
178

179

180
181
182
183
184
185
186
168
169
170
171
172
173
174

175
176

177
178
179
180
181

182
183
184
185
186
187
188
189
190
191







-
+

-
+
+
+
+

-
+

+








## call gnuplot
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"
    if {"\$coord" == "Cartesian"} {
	puts "set nopolar"

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]