From: <and...@us...> - 2008-08-19 19:58:06
|
Revision: 8682 http://plplot.svn.sourceforge.net/plplot/?rev=8682&view=rev Author: andrewross Date: 2008-08-19 19:58:15 +0000 (Tue, 19 Aug 2008) Log Message: ----------- Update some tcl examples to ensure they work correctly with tcldemos.tcl. Modified Paths: -------------- trunk/examples/tcl/tcldemos.tcl trunk/examples/tcl/x01.tcl trunk/examples/tcl/x03.tcl trunk/examples/tcl/x25.tcl trunk/examples/tcl/x26.tcl trunk/examples/tcl/x27.tcl Modified: trunk/examples/tcl/tcldemos.tcl =================================================================== --- trunk/examples/tcl/tcldemos.tcl 2008-08-19 19:26:48 UTC (rev 8681) +++ trunk/examples/tcl/tcldemos.tcl 2008-08-19 19:58:15 UTC (rev 8682) @@ -33,3 +33,10 @@ # restore defaults plcol0 1 proc $i {} "$demo" +for {set i 24} {$i <= 27} {incr i} { + set demo x[format "%02d" $i] + source $demo.tcl + # restore defaults + plcol0 1 + proc $i {} "$demo" +} Modified: trunk/examples/tcl/x01.tcl =================================================================== --- trunk/examples/tcl/x01.tcl 2008-08-19 19:26:48 UTC (rev 8681) +++ trunk/examples/tcl/x01.tcl 2008-08-19 19:58:15 UTC (rev 8682) @@ -40,7 +40,7 @@ plot3 $w # Restore defaults # $w cmd plcol0 1 -# $w cmd plssub 1 1 + $w cmd plssub 1 1 $w cmd pleop } Modified: trunk/examples/tcl/x03.tcl =================================================================== --- trunk/examples/tcl/x03.tcl 2008-08-19 19:26:48 UTC (rev 8681) +++ trunk/examples/tcl/x03.tcl 2008-08-19 19:58:15 UTC (rev 8682) @@ -6,6 +6,7 @@ set twopi [expr 2. * 3.14159265358979323846] # Set up viewport and window, but do not draw box + $w cmd pladv 0 $w cmd plenv -1.3 1.3 -1.3 1.3 1 -2 # Draw circles for polar grid Modified: trunk/examples/tcl/x25.tcl =================================================================== --- trunk/examples/tcl/x25.tcl 2008-08-19 19:26:48 UTC (rev 8681) +++ trunk/examples/tcl/x25.tcl 2008-08-19 19:58:15 UTC (rev 8682) @@ -167,4 +167,8 @@ } } + # Restore defaults + $w cmd plssub 1 1 + $w cmd pleop + } Modified: trunk/examples/tcl/x26.tcl =================================================================== --- trunk/examples/tcl/x26.tcl 2008-08-19 19:26:48 UTC (rev 8681) +++ trunk/examples/tcl/x26.tcl 2008-08-19 19:58:15 UTC (rev 8682) @@ -109,9 +109,8 @@ # Make log plots using two different styles. foreach xl $x_label yl $y_label altyl $alty_label title $title_label linel $line_label { - plot1 $w 0 $xl $yl $altyl $title $linel + plot261 $w 0 $xl $yl $altyl $title $linel } - $w cmd plend } @@ -121,7 +120,7 @@ # Log-linear plot. # -------------------------------------------------------------------------- -proc plot1 { w type x_label y_label alty_label title_label line_label } { +proc plot261 { w type x_label y_label alty_label title_label line_label } { set PI [expr {4.0*atan(1.0)}] Modified: trunk/examples/tcl/x27.tcl =================================================================== --- trunk/examples/tcl/x27.tcl 2008-08-19 19:26:48 UTC (rev 8681) +++ trunk/examples/tcl/x27.tcl 2008-08-19 19:58:15 UTC (rev 8682) @@ -51,7 +51,7 @@ # Loop over the various curves # First an overview, then all curves one by one - + $w cmd pladv 0 $w cmd plssub 3 3 for { set i 0 } { $i < 9 } { incr i } { @@ -67,10 +67,7 @@ $w cmd plvpor 0.0 1.0 0.0 1.0 spiro $w [lindex $params $i] } - # Don't forget to $w cmd plend() to finish off! - $w cmd plend - } # =============================================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |