From: <and...@us...> - 2008-08-20 08:37:30
|
Revision: 8686 http://plplot.svn.sourceforge.net/plplot/?rev=8686&view=rev Author: andrewross Date: 2008-08-20 08:37:38 +0000 (Wed, 20 Aug 2008) Log Message: ----------- Correct tcl example 23 so it works and is consistent with C version. Add tcl examples 23 and 27 to the standard tests. Modified Paths: -------------- trunk/examples/tcl/x23.tcl trunk/plplot_test/test_tcl.sh.in Modified: trunk/examples/tcl/x23.tcl =================================================================== --- trunk/examples/tcl/x23.tcl 2008-08-20 08:36:47 UTC (rev 8685) +++ trunk/examples/tcl/x23.tcl 2008-08-20 08:37:38 UTC (rev 8686) @@ -1,4 +1,4 @@ -# $Id:$ +# $Id$ # # Displays Greek letters and mathematically interesting Unicode ranges # Copyright (C) 2005,2008 Alan Irwin @@ -186,8 +186,8 @@ # non-zero values Must be consistent with nxcells and nycells. matrix offset i 11 = { + 0, 0, - 0, 64, 128, 0, @@ -256,7 +256,7 @@ $w cmd plwind 0.0 1.0 0.0 1.0 $w cmd plgspa xmin xmax ymin ymax $w cmd plschr 0.0 0.8 - set ycharacter_scale [ expr {1.0/($ymax-$ymin)}] + set ycharacter_scale [ expr {1.0/($ymax-$ymin)} ] # Factor should be 0.5, but heuristically it turns out to be larger. $w cmd plgchr chardef charht @@ -277,13 +277,13 @@ set x [ expr {(0.5+$i)*$deltax} ] if {$slice < $length} { if {$page == 0} { - set cmdString [set Greek$slice] - } elseif (($page >= 1) && ($page <= 3)) { - set cmdString [format "##[0x%.4x]" [ Type1 [expr [offset $page]+$slice] ] ] - } elseif ($page >= 4) { - set cmdString [format "##[0x%.4x]" [eval {[lo $page]+$slice}]] + set cmdString [format "#%s" [set Greek$slice]] + } elseif {$page <= 3} { + set cmdString [format "##\[0x%.4x\]" [ Type1 [expr [offset $page]+$slice] ] ] + } else { + set cmdString [format "##\[0x%.4x\]" [expr {[lo $page]+$slice}]] } - $w cmd plptex $x [ expr {$y+$yoffset}] 1. 0. 0.5 $cmdString + $w cmd plptex $x [ expr {$y+$yoffset}] 1. 0. 0.5 [ string range $cmdString 1 end ] $w cmd plptex $x [ expr {$y-$yoffset}] 1. 0. 0.5 $cmdString } incr slice @@ -298,8 +298,9 @@ # Demonstrate methods of getting the current fonts $w cmd plgfci fci_old $w cmd plgfont ifamily istyle iweight - format "For example 23 prior to page 12 the FCI is 0x%x\n" $fci_old - format "For example 23 prior to page 12 the font family, style and weight are %s %s %s\n" $family($ifamily) $style($istyle) $weight($iweight) + puts [ format "For example 23 prior to page 12 the FCI is 0x%x" $fci_old ] + puts [ format "For example 23 prior to page 12 the font family, style and weight are %s %s %s" \ + $family($ifamily) $style($istyle) $weight($iweight) ] for {set page 11} {$page<16} {incr page} { set dy 0.030 Modified: trunk/plplot_test/test_tcl.sh.in =================================================================== --- trunk/plplot_test/test_tcl.sh.in 2008-08-20 08:36:47 UTC (rev 8685) +++ trunk/plplot_test/test_tcl.sh.in 2008-08-20 08:37:38 UTC (rev 8686) @@ -75,7 +75,7 @@ # Skip 17th example because it is not implemented (and if it was, it # would be interactive only). # Other examples are not yet implemented. -for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 22 24 25 26; do +for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 15 16 18 22 23 24 25 26 27; do if [ "$verbose_test" ]; then echo "x${index}" fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |