Ignore:
Timestamp:
Jun 14, 2010, 12:04:02 PM (14 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/gui/scripts/xylegend.tcl

    r1755 r1757  
    474474    $sum length [$xcoords length]
    475475
    476     foreach node $nodes {
    477         set elem [$_tree label $node]
    478         $x set [GetData $elem -x]
    479         $y set [GetData $elem -y]
    480         blt::spline natural $x $y $xcoords $ycoords
    481 
    482         # Sum the interpolated y-coordinate values.
    483         $sum expr "$sum + $ycoords"
    484     }
    485     blt::vector destroy $x $y
    486 
     476        foreach node $nodes {
     477            set elem [$_tree label $node]
     478            $x set [GetData $elem -x]
     479            $y set [GetData $elem -y]
     480            if { [catch {
     481                blt::spline natural $x $y $xcoords $ycoords
     482            }] != 0 } {
     483            }
     484            # Sum the interpolated y-coordinate values.
     485            $sum expr "$sum + $ycoords"
     486        }
     487        blt::vector destroy $x $y
     488    }
    487489    # Get the average
    488490    $sum expr "$sum / [llength $elements]"
Note: See TracChangeset for help on using the changeset viewer.