Changeset 1183 for branches/sandbox


Ignore:
Timestamp:
Dec 7, 2011 1:05:54 PM (9 years ago)
Author:
toby
Message:

make hist file on plot a saved toggle option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/liveplot

    r1182 r1183  
    6969set graph(yunits) 0
    7070set graph(autoraise) 1
     71set graph(setfiletitle) 0
    7172set graph(color_diff) blue
    7273set graph(color_chi2) magenta
     
    626627    tkwait window $bx
    627628    afterputontop
    628     plotdata
    629 }
    630 
    631 proc SetHistTitle {} {
    632     set ::plot_title [histinfo $::hst file]
    633629    plotdata
    634630}
     
    817813        return
    818814    }
    819     if {$::plot_title == "(None)"} {
     815    if {$::graph(setfiletitle) && $::topasfile != ""} {
     816        $box config -title "TOPAS import $::topasfile"
     817    } elseif {$::graph(setfiletitle)} {
     818        $box config -title "$expnam [histinfo $::hst file] cycle $cycle"
     819    } elseif {$::plot_title == "(None)"} {
    820820        $box config -title "$expnam cycle $cycle Hist $hst"
    821821    } else {
     
    12451245    }
    12461246    puts $fp "# LIVEPLOT saved options from [clock format [clock seconds]]"
    1247     foreach v {printout legend outname outcmd autoraise chi2 xunits yunits OmCoS} {
     1247    foreach v {
     1248        printout legend outname outcmd autoraise
     1249        chi2 xunits yunits OmCoS setfiletitle} {
    12481250        puts $fp "set graph($v) [list $graph($v)]"
    12491251    }
     
    23432345.a.file.menu add command -label "Set Plot Title" \
    23442346        -command SetTitle
    2345 .a.file.menu add command -label "Set Plot Title to data file" \
    2346         -command SetHistTitle
     2347.a.file.menu add checkbutton -label "Set Plot Title to data file" \
     2348    -variable graph(setfiletitle) \
     2349    -command {set cycle [getcycle];readdata .g}
     2350
    23472351.a.file.menu add cascade -label "Export plot" -menu .a.file.menu.export
    23482352menu .a.file.menu.export
Note: See TracChangeset for help on using the changeset viewer.