ONPLOT

Purpose:

Executes statements when a Window is plotted.

Syntax:

ONPLOT(statements)

statements

-

Any valid SPL expressions separated by semicolons.

Returns:

Nothing, executes the statement list whenever the Window is plotted.

Example:

W1: gnorm(100,.01);onplot(setwlike(W0,W2,1,1))

W2: gnorm(100,.01)

 

When W1 is scrolled or sized, W2 also scrolls or sizes. W2 is graphically linked to W1. However, in this case, changing W2 causes W1 to update since W1 explicitly depends on W2 (from the ONPLOT expression).

Example:

W1: gnorm(100,.01);onplot(eval('setwlike(W0,W2,1,1)'))

W2: gnorm(100,.01)

 

Same as above, except EVAL removes the explicit dependency of W1 on W2. W2 automatically scrolls or sizes when W1 scrolls or sizes, but W1 does not update when W2 changes.

Example:

W1: gnorm(100,.01);onplot(eval('setwlike(W0,W2,1,1)'))

W2: gnorm(100,.01);onplot(eval('setwlike(W0,W1,1,1)'))

 

W1 scrolls or sizes when W2 scrolls or sizes and W2 scrolls or sizes when

W1 scrolls or sizes. EVAL removes the circular dependencies of W1 and W2.

Remarks:

Any valid statements can be used. Multiple statements are delimited by the ; (semicolon).

See Also:

EVAL

PLOTMODE

SETWLIKE

W0