Changeset 22
- Timestamp:
- Dec 13, 2006 12:05:49 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/utils/bt5/bt5plot/bt5plot
r21 r22 249 249 } 250 250 251 # Create menu 252 menubutton .mb -text File -menu .mb.fileMenu 253 set m [menu .mb.fileMenu -tearoff 0] 254 $m add command -label "Set Data Dir" -command selectDirectory 251 #Create menu frame 252 set mf [frame .mf] 253 254 # Create File menu 255 menubutton $mf.filemb -text File -menu $mf.filemb.fileMenu 256 set fm [menu $mf.filemb.fileMenu -tearoff 0] 257 $fm add command -label "Set Data Dir" -command selectDirectory 258 259 #Create Plot menu 260 menubutton $mf.plotmb -text Plot -menu $mf.plotmb.plotMenu 261 set pm [menu $mf.plotmb.plotMenu -tearoff 0] 262 $pm add cascade -label "Type" -menu $pm.type 263 $pm add cascade -label "X-Axis" -menu $pm.xaxis 264 $pm add cascade -label "Y-Axis" -menu $pm.yaxis 265 #Create sub menus 266 set xam [menu $pm.xaxis -tearoff 0] 267 $xam add radio -label "Lin" -variable loglinX -value "no" -command {changeLogLinX} 268 $xam add radio -label "Log" -variable loglinX -value "yes" -command {changeLogLinX} 269 270 set yam [menu $pm.yaxis -tearoff 0] 271 $yam add radio -label "Lin" -variable loglinY -value "no" -command {changeLogLinY} 272 $yam add radio -label "Log" -variable loglinY -value "yes" -command {changeLogLinY} 273 274 set ptm [menu $pm.type -tearoff 0] 275 $ptm add radio -label "Counts" -variable plotType -value "count" -command {foreach elem [$graph element show] { changePlotType $elem }} 276 $ptm add radio -label "Count Rate" -variable plotType -value "countrate" -command {foreach elem [$graph element show] { changePlotType $elem }} 277 $ptm add radio -label "Trans" -variable plotType -value "trans" -command {foreach elem [$graph element show] { changePlotType $elem }} 278 $ptm add radio -label "Mon" -variable plotType -value "mon" -command {foreach elem [$graph element show] { changePlotType $elem }} 279 280 #pack menubuttons into menu 281 pack $mf.filemb -side left 282 pack $mf.plotmb -side left 255 283 256 284 # Create tree … … 301 329 button $pcf.filterReset -text "Clear Plot" -command {resetGraph} 302 330 303 # Frame for radiobutton set to control plot type304 set ptf [frame .filter.pc.pt -borderwidth 1 -relief raised]305 radiobutton $ptf.c -text "Counts" -variable plotType -value "count" -command {foreach elem [$graph element show] { changePlotType $elem }}306 radiobutton $ptf.cr -text "Count Rate" -variable plotType -value "countrate" -command {foreach elem [$graph element show] { changePlotType $elem }}307 radiobutton $ptf.t -text "Trans" -variable plotType -value "trans" -command {foreach elem [$graph element show] { changePlotType $elem }}308 radiobutton $ptf.m -text "Mon" -variable plotType -value "mon" -command {foreach elem [$graph element show] { changePlotType $elem }}309 $ptf.c select310 pack $ptf.m -side right311 pack $ptf.t -side right312 pack $ptf.cr -side right313 pack $ptf.c -side right314 315 # Frame for y-axis log/lin choice316 set logfy [frame .filter.pc.logy -borderwidth 1 -relief raised]317 # Log/lin radiobutton set318 radiobutton $logfy.log -text "Log Y" -variable loglinY -value "yes" -command { changeLogLinY }319 radiobutton $logfy.lin -text "Lin Y" -variable loglinY -value "no" -command { changeLogLinY }320 $logfy.lin select321 pack $logfy.log -side right322 pack $logfy.lin -side right323 324 # Frame for y-axis log/lin choice325 set logfx [frame .filter.pc.logx -borderwidth 1 -relief raised]326 # Log/lin radiobutton set327 radiobutton $logfx.log -text "Log X" -variable loglinX -value "yes" -command { changeLogLinX }328 radiobutton $logfx.lin -text "Lin X" -variable loglinX -value "no" -command { changeLogLinX }329 $logfx.lin select330 pack $logfx.log -side right331 pack $logfx.lin -side right331 ##Frame for radiobutton set to control plot type 332 #set ptf [frame .filter.pc.pt -borderwidth 1 -relief raised] 333 #radiobutton $ptf.c -text "Counts" -variable plotType -value "count" -command {foreach elem [$graph element show] { changePlotType $elem }} 334 #radiobutton $ptf.cr -text "Count Rate" -variable plotType -value "countrate" -command {foreach elem [$graph element show] { changePlotType $elem }} 335 #radiobutton $ptf.t -text "Trans" -variable plotType -value "trans" -command {foreach elem [$graph element show] { changePlotType $elem }} 336 #radiobutton $ptf.m -text "Mon" -variable plotType -value "mon" -command {foreach elem [$graph element show] { changePlotType $elem }} 337 #$ptf.c select 338 #pack $ptf.m -side right 339 #pack $ptf.t -side right 340 #pack $ptf.cr -side right 341 #pack $ptf.c -side right 342 343 ##Frame for y-axis log/lin choice 344 #set logfy [frame .filter.pc.logy -borderwidth 1 -relief raised] 345 ##Log/lin radiobutton set 346 #radiobutton $logfy.log -text "Log Y" -variable loglinY -value "yes" -command { changeLogLinY } 347 #radiobutton $logfy.lin -text "Lin Y" -variable loglinY -value "no" -command { changeLogLinY } 348 #$logfy.lin select 349 #pack $logfy.log -side right 350 #pack $logfy.lin -side right 351 352 ##Frame for y-axis log/lin choice 353 #set logfx [frame .filter.pc.logx -borderwidth 1 -relief raised] 354 ##Log/lin radiobutton set 355 #radiobutton $logfx.log -text "Log X" -variable loglinX -value "yes" -command { changeLogLinX } 356 #radiobutton $logfx.lin -text "Lin X" -variable loglinX -value "no" -command { changeLogLinX } 357 #$logfx.lin select 358 #pack $logfx.log -side right 359 #pack $logfx.lin -side right 332 360 333 361 pack $pcf.filterReset -side right -padx 25 334 pack $logfy -side right335 pack $logfx -side right336 pack $ptf -side right362 #pack $logfy -side right 363 #pack $logfx -side right 364 #pack $ptf -side right 337 365 pack $pcf -side right 338 366 339 367 340 368 # Pack widgets 341 pack .mb-side top -anchor w369 pack $mf -side top -anchor w 342 370 pack .vp -fill both -expand true -anchor w 343 371 pack .filter -side bottom -fill x -anchor sw
Note: See TracChangeset
for help on using the changeset viewer.