minterp -- create and manipulate MathViews
interpreters
minterp option ?arg?MxtThis command makes it possible to create one or more new MathViews
interpreters. Each MathViews interpreter is independent from the others: it has
its own name-space for variables and functions. The minterp command has three forms:
minterp returns a Tcl list consisting of the names of the currently-defined MathViews interpreters.
minterp create mvCmd
Creates a Tcl command whose name is mvCmd, if it does not already exist, and returns the argument mvCmd. If mvCmd does exists, returns an error.
minterp delete mvCmd
Deletes the MathViews interpreter mvCmd. If no such interpreter exists, returns an error.
minterp version Returns the version number of the MathViews interpreter. This number is distinct from the version of the Tcl package which provides it.
Each MathViews interpreter created by the minterp command can be used to evaluate MathViews
scripts, list MathViews variables, format variables as Tcl lists, and
manipulate figures. MathViews interpreters have the following forms:
eval
arg ?arg ...?
The arguments to the eval
option are merged into a single script and evaluated by the MathViews
interpreter. The command returns a string showing the value of the
variables changed by the MathViews script.
Note that curly braces may be needed in order to prevent the
evaluation of arguments by the Tcl interpreter. Also note that the
state of that MathViews interpreter, consisting of variables and
function definitions, persists across invocations of the eval option.
A description of the MathViews language can be found here.
var ?arg arg
...? The var option makes it
possible to convert MathViews matrix and vector variables into Tcl lists. The
var option has several forms:
var returns a list of all the currently defined variables in the global MathViews name-space. (Note that each MathViews command has its own separate name-space.)
var varName
?-c? formats the elements of the MathViews variable varName in a Tcl list. If varName is an mxn matrix, then the returned list consists of n sublists, each sublist consisting of the m elements of each column.
var varName
-r formats the elements of the MathViews variable varName in a Tcl list. If varName is an mxn matrix, then the returned list consists of m sublists, each sublist consisting of the n elements of each row.
var varName -f
?-r -c? formats the elements of the MathViews variable
varName in a Tcl list. If varName is an m×n matrix, then the returned
list consists of mxn elements. If -r is specified, then the elements are listed in
row order. Otherwise, they are listed in column order.
var varName
-format spec ?-f -r -c? formats the elements of the MathViews variable varName in a Tcl list using spec as a printf-style formatting specification.
figure ?arg
arg? A MathViews interpreter maintains a set of off-screen
virtual figures. The figure option
manipulates them. One figure in the set is always designated as the
"current" figure -- the figure to which 2D and 3D plotting
commands (issued in a MathViews script) are directed. Once created,
figures can be rendered using graph Tk widgets, described in the
documentation for the graph command. The figure option has several forms:
figure returns a Tcl list whose elements are the names of the figures associated with mvCmd
figure create
figName creates the figure figName.
figure delete
figName deletes the figure figName.
figure clear
figName clears the figure figName, thus restoring it to its state immediately after creation.
figure current
returns the name of the figure which is the current figure. All MathViews plotting commands are directed to this figure.
figure current
figName set figName as the current figure. All subsequent MathViews plotting commands will be directed to this figure.
configure ?arg arg
...? The configure option is
used to override some of the default behavior of the MathViews interpreter
mvCmd.
configure returns a list of configuration property name-value pairs.
configure -putProc
proc use Tcl procedure proc to output a MathViews interpreter's result. The procedure must accept a single argument. The MathViews interpreter will pass its result as the argument to proc and call proc. To restore the default behavior, use an empty string for proc.
configure -pauseProc
proc call Tcl procedure proc
in response to the MathViews command pause(). The procedure will be called with a
single argument -- the number of seconds to sleep the executing process. To
restore the default behavior, use an empty string for proc.
Last modified: Mon Nov 30 16:30:03 PST 1998