Changeset 1759 for branches/blt4


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

Legend:

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

    r1757 r1759  
    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             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     }
     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
    489489    # Get the average
    490490    $sum expr "$sum / [llength $elements]"
Note: See TracChangeset for help on using the changeset viewer.