From: <and...@us...> - 2009-05-05 11:16:05
|
Revision: 9916 http://plplot.svn.sourceforge.net/plplot/?rev=9916&view=rev Author: andrewross Date: 2009-05-05 11:15:34 +0000 (Tue, 05 May 2009) Log Message: ----------- Fix to ensure plrandd works correctly with tk. Fixes the interactive test with plserver in the install tree. Modified Paths: -------------- trunk/bindings/tk/PLWin.itk trunk/examples/tcl/x17.tcl trunk/examples/tcl/x21.tcl Modified: trunk/bindings/tk/PLWin.itk =================================================================== --- trunk/bindings/tk/PLWin.itk 2009-05-05 08:47:27 UTC (rev 9915) +++ trunk/bindings/tk/PLWin.itk 2009-05-05 11:15:34 UTC (rev 9916) @@ -67,6 +67,10 @@ eval $plwin cmd plshade $args } + method plrandd {args} { + eval $plwin cmd plrandd $args + } + # From here on down, we just insert what comes out of plitclgen (file # gen.itcl). If you don't like the handling of one of these for some # reason, then add the method name to the ignore list in plitclgen, Modified: trunk/examples/tcl/x17.tcl =================================================================== --- trunk/examples/tcl/x17.tcl 2009-05-05 08:47:27 UTC (rev 9915) +++ trunk/examples/tcl/x17.tcl 2009-05-05 11:15:34 UTC (rev 9916) @@ -101,7 +101,7 @@ after 10 ;# Wait for 10 ms set t [expr {double($n) * $dt}] - set noise [expr {[plrandd] - 0.5}] + set noise [expr {[$w cmd plrandd] - 0.5}] set y1 [expr {$y1 + $noise}] set y2 [expr {sin($t*$PI/18.)}] set y3 [expr {$y2 * $noise}] Modified: trunk/examples/tcl/x21.tcl =================================================================== --- trunk/examples/tcl/x21.tcl 2009-05-05 08:47:27 UTC (rev 9915) +++ trunk/examples/tcl/x21.tcl 2009-05-05 11:15:34 UTC (rev 9916) @@ -85,8 +85,8 @@ $w cmd plseed 5489 for {set i 0} {$i < $pts} {incr i} { - set xt [expr {($xmax-$xmin)*[plrandd]}] - set yt [expr {($ymax-$ymin)*[plrandd]}] + set xt [expr {($xmax-$xmin)*[$w cmd plrandd]}] + set yt [expr {($ymax-$ymin)*[$w cmd plrandd]}] if {$randn == 0} { x $i = [expr {$xt + $xmin}] y $i = [expr {$yt + $ymin}] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |