Tcl/Tk primitives

Most of the primitives that interface to Tcl appear in libraries that reflect their function. For instance, all the primitives beginning with Tk in the sinks library are actually Tcl primitives derived from TclScript. This is the most generic Tcl primitive with no function on its own. It must have a Tcl script associated with it to make it useful. Please refer to Programming→Using Tcl/Tk in primitives to learn about writing such scripts.

Interactive graphics facilities

These primitives are multiple configurations of only six primitives. These primitives all use the Tk toolkit associated with the Tcl language to create interactive, animated displays on the screen.

TkPlot
Plot Y input(s) vs. time with dynamic updating. Two styles are currently supported: dot causes individual points to be plotted, whereas connect causes connected lines to be plotted. Drawing a box in the plot will reset the plot area to that outlined by the box. There are also buttons for zooming in and out, and for resizing the box to just fit the data in view.
TkXYPlot
Plot Y input(s) vs. X input(s) with dynamic updating. Two styles are currently supported: dot causes points to be plotted, whereas connect causes connected lines to be plotted. Drawing a box in the plot will reset the plot area to that outlined by the box. There are also buttons for zooming in and out, and for resizing the box to just fit the data in view.
TkShowValues
Display the values of the inputs in textual form. The print method of the input particles is used, so any data type can be handled, although the space allocated on the screen may need to be adjusted.
TkBarGraph
Dynamically display the value of any number of input signals in bar-chart form. The first 12 input signals will be assigned distinct colors. After that, the colors are repeated. The colors can be controlled using X resources.
TkMeter
Dynamically display the value of any number of input signals on a set of bar meters.
TkShowBooleans
Display input Booleans using color to highlight their value.

Other primitives

TclScript
Invoke a Tcl script that can optionally define a procedure that is invoked every time the primitive fires. That procedure can read the primitive's inputs and update the value of the outputs.
TkText
Display the values of the inputs in a separate window, keeping a specified number of past values in view. The print method of the input particles is used, so any data type can be handled.