4 # --------------------------------------------------------------------------
5 # Starting with Tcl 8.x, the BLT commands are stored in their own
6 # namespace called "blt". The idea is to prevent name clashes with
7 # Tcl commands and variables from other packages, such as a "table"
8 # command in two different packages.
10 # You can access the BLT commands in a couple of ways. You can prefix
11 # all the BLT commands with the namespace qualifier "blt::"
14 # blt::table . .g -resize both
16 # or you can import all the command into the global namespace.
18 # namespace import blt::*
20 # table . .g -resize both
22 # --------------------------------------------------------------------------
23 if { $tcl_version >= 8.0 } {
24 namespace import blt::*
25 namespace import -force blt::tile::*
27 source scripts/demo.tcl
29 option add *graph.Element.ScaleSymbols true
31 # test to show spline over-shooting
35 # Make and fill small vectors
43 # make and fill (x only) large vectors
46 # natural spline interpolation
47 spline natural x y x2 y1
49 # quadratic spline interpolation
50 spline quadratic x y x2 y2
54 .graph xaxis configure -title "x^2"
55 .graph yaxis configure -title "sin(y^3)"
57 .graph pen configure activeLine -pixels 5
58 .graph element create Original -x x -y y \
64 .graph element create Natural -x x2 -y y1 \
70 .graph element create Quadratic -x x2 -y y2 \
76 table . .graph -fill both
80 Blt_ActiveLegend .graph
81 Blt_ClosestPoint .graph