home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / TCL / BLT / BLT1.7L1 / BLT1 / blt-1.7 / applications / extloader / demos / blt / graph3 < prev    next >
Encoding:
Text File  |  1994-04-22  |  785 b   |  35 lines

  1. #!../../wish -f
  2.  
  3. set env(TCL_EXTMAP) "./extensions.tcl"
  4. extension add blt
  5.  
  6. set graph .g
  7.  
  8. blt_graph $graph
  9. $graph xaxis configure -title "Years"
  10. $graph yaxis configure -title "Random values"
  11. $graph y2axis configure -mapped true -title "Random values"
  12.  
  13. set x { 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 }
  14. set y { 
  15.     0.693147 0.405465 0.287682 0.223144 0.182322 0.154151 
  16.     0.133531 0.117783 0.105361 0.0953102 0.0870114 
  17. }
  18.  
  19. set y2 { 
  20. 19.8669 38.9418 56.4642 71.7356 84.1471 93.2039
  21. 98.545 99.9574 97.3848 90.9297 80.8496
  22. }
  23.  
  24. $graph element create line1 -symbol circle -bg red -linewidth 1 \
  25.     -x $x -y $y 
  26. $graph element create line2 -symbol square -bg yellow -linewidth 1 \
  27.     -x $x -y $y2 -mapy y2
  28.  
  29. pack .g
  30.  
  31. source features.tcl
  32. SetZoom .g
  33. SetActiveLegend .g
  34. SetClosestPoint .g
  35.