README.tcldemos
1Running the Tcl Demos.
2
3Note these directions as well as taking proper care of all the
4dependencies have been incorporated into our CMake-based build systems
5for the core build and the installed examples build. So the tests
6below of the Tcl component of PLplot can be done by simply running
7
8make test_interactive
9
10However, we preserve the directions below for historical reasons and
11in case you want to do any of these commands by hand, e.g., with
12valgrind.
13
14There are two ways to run the examples below, where the alternatives
15are indicated by "|". The first alternative should only be used if
16you have changed directories to
17$prefix/share/plplot$VERSION/examples/tcl where $prefix is the PLplot
18install prefix and $VERSION is the PLplot release version, e.g.,
195.9.10. That is, the first alternative should be used if you have
20changed directories to the installed examples/tcl directory. The
21second alternative should only be used if you have changed directories
22to bindings/examples/ttcl in the build tree.
23
24To run individual examples, run the x?? script corresponding to the x??.tcl
25example, where ?? is 00 through 33 (except for 32), e.g.,
26
27./x00 -dev xwin | env PATH=../../bindings/tcl:$PATH ./x00 -dev xwin
28
29Note, -dev xwin is just one possible PLplot driver, and there are many others.
30
31To find out all the possible command-line
32options run pltcl -h or x?? -h (every x?? script runs pltcl).
33
34To run the plot.tcl demo follow the directions in that file to run it
35under pltcl with the various standard devices.
36
37To run the plgrid.tcl demo follow the directions in that file to run it
38under pltcl with the various standard devices.
39
40tcldemos.tcl runs all the standard examples except for example 32.
41
42There are two ways to run tcldemos.tcl:
43
44(1)
45pltcl | ../../bindings/tcl/pltcl
46plinit
47source tcldemos.tcl
480
491
502
51....
52plend
53exit
54
55Note the pltcl command has normal PLplot command-line options (run pltcl -h
56to find out what they are). In fact, you can specify, e.g., -dev tk or
57-dev xwin, but since plinit has to be run in any case, you might as
58well use the device driver chooser in that case.
59
60(2) Note, fill in $prefix below with whatever you configured for the install
61prefix (/usr/local/plplot or whatever) and $VERSION with the plplot VERSION
62you are running at this time (5.11.0 or whatever).
63
64tclsh
65lappend auto_path $prefix/share/plplot$VERSION | ../../bindings/tcl
66package require Pltcl
67plinit
68source tcldemos.tcl
690
701
712
72....
73plend
74exit
75
76To find out more about the tclsh command (which comes as part of the tcl
77package) use man tclsh.
78
79Both the pltcl and tclsh methods execute the various x??.tcl examples
80corresponding to the numbers (in the range from 0 to 33, except for 32)
81specified by the user.
82
83Test the matrix capabilities of the tclmatrix library.
84
85pltcl | ../../bindings/tcl/pltcl
86source <top of source tree>/bindings/tcl/test_tclmatrix.tcl
87ctrl-D to exit pltcl
88
89Copy complete output from the above and compare (e.g., with diff) with the
90file <top of source tree>/bindings/tcl/test_tclmatrix.out which contains
91the results that should be generated above if the tclmatrix library
92is working properly on your platform.
93