1 proc FormatAxisLabel {graph x} {
2 return "[expr int($x)]\260"
5 set configOptions [subst {
8 Axis.TickFont { helvetica 12 bold }
9 Axis.TitleFont { helvetica 12 bold }
12 Element.ScaleSymbols yes
13 Font { helvetica 23 bold }
14 Legend.ActiveBorderWidth 2
15 Legend.ActiveRelief raised
18 Legend.Font { Helvetica 24 }
19 Legend.Position plotarea
21 Title "Sine and Cosine Functions"
22 x.Command [namespace current]::FormatAxisLabel
33 set resName [string trimleft $graph .]
34 foreach { option value } $configOptions {
35 option add *$resName.$option $value
38 $graph configure -leftvar changed
41 set pi1_2 [expr 3.14159265358979323846/180.0]
43 vector create x sinX cosX -variable ""
45 sinX expr { sin(x*$pi1_2) }
46 cosX expr { cos(x*$pi1_2) }
48 $graph element create line1 \
54 $graph element create line2 \
63 Blt_ActiveLegend $graph
64 Blt_ClosestPoint $graph
67 $graph marker create bitmap \
69 -coords "-360 -1 360 1" \
70 -bitmap @bitmaps/greenback.xbm \
76 $graph postscript configure \