6
#set gnuPlotstream [open {| gnuplot /d19/staff/wfs/tmp/jo } w]
7
set gnuPlotstream [open {| gnuplot } r+]
12
puts stdout $com ; flush stdout
13
puts $gnuPlotstream $com ; flush $gnuPlotstream
18
switch -exact "X[lindex $argv $ii]" {
20
sendgnu "set parametric\n"
21
sendgnu "set data style lines\n"
22
sendgnu "set hidden\n"
23
set ii [expr {$ii + 1}]
24
sendgnu "splot '[lindex $argv $ii]'\n" }
26
set ii [expr {$ii + 1}]
27
sendgnu "set data style lines"
28
sendgnu "plot '[lindex $argv $ii]'\n"
31
set ii [expr {$ii + 1}]
32
sendgnu "set title '[lindex $argv $ii]'\n" }
35
set ii [expr {$ii +1}]
43
.text configure -height 4 -width 40
46
# unlink gnu-optionsxx
49
sendgnu "save '$tmp'\n"
50
while {[file exists $tmp] <= 0} {exec sleep 0}
51
set at [.fra.options nearest 0]
52
set f [ open gnu-optionsxx ]
53
.fra.options delete 0 end
54
while { [gets $f line] >= 0 } {
55
.fra.options insert end [lrange $line 0 end ]}
56
.fra.options yview $at
60
label .fra.label -text "Current Set Options"
61
scrollbar .fra.scroll -command ".fra.options yview"
62
listbox .fra.options -yscrollcommand ".fra.scroll set" -relief sunken -bd 2
64
pack .fra.options -side left
65
pack .fra.scroll -side right -fill y
66
bind .fra.options <Double-1> "set selected_option \[lindex \[selection get\] 0\]"
70
sendgnu [format "%s\n\nreplot\n" [expr $$a]] ;
74
proc mkOption_edit {a b} {
76
label $a.label -text "Edit: "
77
entry $a.entry -width 20 -relief sunken -bd 2 -textvariable $b
78
bind $a.entry <Return> "msg $b"
79
pack $a.label $a.entry -side left -padx 1m -pady 2m
82
mkOption_edit .option_edit selected_option
87
button .exit -text "Exit" -command {
92
button .save -text "save gnuplot.out" -command {
93
sendgnu "save 'gnuplot.out'\n"
96
scale .rotxscale -label "xrotation" \
97
-orient horizontal -length 200 -from 0 -to 180 \
98
-command gnuPlotsetview -tickinterval 60
99
scale .rotzscale -label "zrotation" \
100
-orient horizontal -length 200 -from 0 -to 360 \
101
-command gnuPlotsetview -tickinterval 120
107
proc gnuPlotsetview value {
109
if { $initted < 2 } { set initted [expr {$initted + 1}]} \
111
{sendgnu [format "set view %d,%d\nreplot\n" [.rotxscale get] [.rotzscale get]]}}
113
pack .exit .rotxscale .rotzscale .fra .option_edit .save