SETVPORT

Purpose:

Sets the viewport of the current Window to the input Window.

Syntax:

SETVPORT(srcwin, deswin)

srcwin

-

A Window. The template Window.

deswin

-

Optional. A Window, the Window to modify. Defaults to the current Window.

Returns:

Nothing.

Examples:

W1: gnorm(1000,.01);setx(.2, .5)

W2: W1*W1;setvport(w1);

 

The squared data in W2 is displayed with the same X and Y range as W1.

Example:

setvport(w1, w2)

 

Same as above, but the destination window, W2, is explicit.

Example:

W3: gnorm(100,1);onplot(eval("setvport(w3, w4)"))

W4: gsin(100,1,.02)

 

The viewport of W4 is linked to the viewport of W3. W4 will scroll, expand or compress whenever W3 scrolls, expands or compresses (ONPLOT). The ONPLOT function uses EVAL to prevent W3 from referring to itself.

Remarks:

SETVPORT also works properly on arrays and images and is useful when visually comparing data.

See Also:

CUT

EVAL

ONPLOT