1 #!/home/people/tkys/Eos/util/SGI/bin/bltwish
8 bitmap define pattern1 { {4 4} {01 02 04 08} }
9 bitmap define pattern2 { {4 4} {08 04 02 01} }
10 #bitmap define pattern3 { {2 2} {01 02 } }
11 bitmap define pattern4 { {4 4} {0f 00 00 00} }
12 bitmap define pattern5 { {4 4} {01 01 01 01} }
13 bitmap define pattern6 { {2 2} {01 00 } }
14 bitmap define pattern7 { {4 4} {0f 01 01 01} }
15 bitmap define pattern8 { {8 8} {ff 00 ff 00 ff 00 ff 00 } }
16 bitmap define pattern9 { {4 4} {03 03 0c 0c} }
17 bitmap define hobbes { {25 25} {
18 00 00 00 00 00 00 00 00 00 c0 03 00 78 e0 07 00 fc f8 07 00 cc 07 04 00
19 0c f0 0b 00 7c 1c 06 00 38 00 00 00 e0 03 10 00 e0 41 11 00 20 40 11 00
20 e0 07 10 00 e0 c1 17 00 10 e0 2f 00 20 e0 6f 00 18 e0 2f 00 20 c6 67 00
21 18 84 2b 00 20 08 64 00 70 f0 13 00 80 01 08 00 00 fe 07 00 00 00 00 00
25 option add *graph.x.Title "X Axis Label"
26 option add *graph.y.Title "Y Axis Label"
27 option add *graph.title "A Simple Barchart"
28 option add *graph.x.Font *Times-Medium-R*10*
29 option add *graph.Element.Relief raised
31 set visual [winfo screenvisual .]
32 if { $visual != "staticgray" && $visual != "grayscale" } {
33 option add *graph.LineMarker.color yellow
34 option add *graph.Element.Background white
35 option add *graph.Legend.activeForeground pink
36 option add *print.background yellow
37 option add *quit.background red
38 option add *graph.background palegreen
39 option add *graph.plotBackground lightblue
43 { This is an example of the barchart widget. The barchart has
44 many components; x and y axis, legend, crosshairs, elements, etc.
45 To create a postscript file "bar.ps", press the %%
47 button $w.print -text {Print} -command {
48 $graph postscript output bar.ps
55 barchart $graph -relief raised -bd 2
56 $graph xaxis configure -rotate 90 -stepsize 0
57 $w append $graph -fill both -padx 4
62 button $w.quit -text quit -command exit
65 %% button when you've seen enough.%%
67 label $w.logo -bitmap BLT
68 $w append $w.logo -padx 20
72 set names { One Two Three Four Five Six Seven Eight }
73 if { $visual == "staticgray" || $visual == "grayscale" } {
74 set fgcolors { white white white white white white white white }
75 set bgcolors { black black black black black black black black }
77 set fgcolors { yellow orange red magenta purple blue cyan green }
78 set bgcolors { yellow4 orange4 red4 magenta4 purple4 blue4 cyan4 green4 }
81 set numColors [llength $names]
90 $graph element create sin -relief raised -bd 1 -x x -y y -barwidth $barWidth
91 table . .htext -fill both
97 Blt_ActiveLegend $graph
98 Blt_ClosestPoint $graph