Changeset 993 for trunk/liveplot


Ignore:
Timestamp:
Aug 10, 2010 5:27:26 PM (10 years ago)
Author:
toby
Message:

make label phase name/number a saved option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/liveplot

    r990 r993  
    8080set expgui(hklbox) 1
    8181set expgui(autotick) 0
     82set expgui(phaselabel) 0
    8283set expgui(pixelregion) 5
    8384# location for web pages, if not found locally
     
    134135    color1 magenta
    135136    color2 cyan
    136     color3 yellow
     137    color3 black
    137138    color4 sienna
    138139    color5 orange
     
    572573    global lasthst graph expgui box
    573574
     575    foreach p $::expmap(phaselist) {
     576        if {$expgui(phaselabel)} {
     577            # 20 characters, max
     578            set graph(label$p) [string range [phaseinfo $p name] 0 19]
     579           
     580        } else {
     581            set graph(label$p) Phase$p
     582        }
     583    }
    574584    # is there a new histogram to load?
    575585    if {$hst != $lasthst} {
     
    636646                    $box marker config peaks${i}_$j \
    637647                            $graph(MarkerColorOpt) [list $peakinfo(color$i)]
    638                     if $peakinfo(dashes$i) {
     648                    if {$peakinfo(dashes$i) && ! $expgui(autotick)} {
    639649                        $box marker config peaks${i}_$j -dashes "5 5"
    640650                    }
     
    9981008        puts $fp "set graph(color_$v) [list $graph(color_$v)]"
    9991009    }
    1000     foreach v {font lblfontsize fadetime hklbox pixelregion autotick} {
     1010    foreach v {font lblfontsize fadetime hklbox pixelregion autotick phaselabel} {
    10011011        puts $fp "set expgui($v) [list $expgui($v)]"
    10021012    }
     
    20732083        -value 1 -variable expgui(autotick) -command plotdata
    20742084.a.options.menu.tick add separator
    2075 .a.options.menu.tick add command -label "Label by name" \
    2076         -command {
    2077     foreach p $expmap(phaselist) {
    2078         # 20 characters, max
    2079         set graph(label$p) [string range [phaseinfo $p name] 0 19]
    2080         plotdata
    2081     }
    2082 }
     2085.a.options.menu.tick add radiobutton -label "Label by phase number" \
     2086        -value 0 -variable expgui(phaselabel) -command plotdata
     2087.a.options.menu.tick add radiobutton -label "Label by phase name" \
     2088        -value 1 -variable expgui(phaselabel) -command plotdata
    20832089.a.options.menu.tick add separator
    20842090
Note: See TracChangeset for help on using the changeset viewer.