Changeset 825


Ignore:
Timestamp:
Dec 4, 2009 5:12:41 PM (14 years ago)
Author:
toby
Message:

# on 2004/10/04 20:28:29, toby did:
remove unused diffvec
redo vector variable access -- fix bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/excledt.tcl

    • Property rcs:date changed from 2004/05/13 23:38:46 to 2004/10/04 20:28:29
    • Property rcs:lines changed from +4 -2 to +12 -18
    • Property rcs:rev changed from 1.13 to 1.14
    r793 r825  
    106106            obsvec set $obslist
    107107            calcvec set $calclist
    108             diffvec set [obsvec - calcvec]
    109108            exxvec set $exclistx
    110109            exobsvec set $exclistobs
    111             global obsvec calcvec diffvec
    112             set maxdiff  [set diffvec(max)]
     110            foreach vec {obsvec calcvec} {
     111                # probably not needed with recent versions of BLT:
     112                global $vec
     113                # sometimes needed for latest version of BLT (2.4z)
     114                catch {$vec variable $vec}
     115            }
    113116            set cmin [set calcvec(min)]
    114117            set omin [set obsvec(min)]
     
    116119            set omax [set obsvec(max)]
    117120            foreach {expgui(min) expgui(max)} {0 0} {}
    118             catch {
    119                 set expgui(min) [expr $omin < $cmin ? $omin : $cmin]
    120                 set expgui(max) [expr $omax > $cmax ? $omax : $cmax]
    121                 set ymin1 [expr $cmin - 1.1*$maxdiff]
    122                 set ymin2 [expr $omin - 1.1*$maxdiff]
    123                 if {$ymin1 < $ymin2} {
    124                     diffvec set [diffvec + $ymin1]
    125                 } {
    126                     diffvec set [diffvec + $ymin2]
    127                 }
    128             }
    129         }
    130     }
    131     plotExclData
     121            set expgui(min) [expr $omin < $cmin ? $omin : $cmin]
     122            set expgui(max) [expr $omax > $cmax ? $omax : $cmax]
     123        }
     124        plotExclData
     125    }
    132126}
    133127
     
    152146            -pixels [expr 0.125 * $peakinfo(exclsize)]i
    153147
    154     foreach vec {xvec obsvec calcvec diffvec exxvec exobsvec} {
     148    foreach vec {xvec obsvec calcvec exxvec exobsvec} {
    155149        $vec notify now
    156150    }
     
    394388    $graph(plot) element config 2 -color $graph(color_calc)
    395389    $graph(plot) element config 12 -color $graph(color_excl)
    396     foreach vec {xvec obsvec calcvec diffvec exxvec exobsvec} {
     390    foreach vec {xvec obsvec calcvec exxvec exobsvec} {
    397391        $vec notify now
    398392    }
Note: See TracChangeset for help on using the changeset viewer.