Sets a parent window to update dependent windows whenever the parent window plots.
SETONPLOTCALC(win1, win2, ..., winN, mode)
winN |
- |
Optional. Zero or more window references. Defaults to the current window. |
||||
mode |
- |
An integer, the window ONPLOTCALC mode:
|
A positive integer if SETONPLOTCALC is active for the window list, else 0.
setonplotcalc(w1, 1);
W1: gnorm(10000, 1/10000);
W2: integ(w1);
W3: spectrum(w2);
loglog(w3);
The ONPLOTCALC mode is activated for W1.
W1 contains 10000 samples of normally distributed random noise.
W2 integrates the data in W1.
W3 computes the frequency domain SPECTRUM of W2 displayed with log-log scales.
Each time W1 plots due to scrolling, mousing or coordinate manipulation, W2 updates by computing the integration of the time segment displayed in W1. W3 automatically updates whenever W2 changes. Thus, whenever W1 plots, the integral of the displayed segment is computed and the spectrum of the integral segment is computed.
setonplotcalc(w1, 1);
W1: gnorm(10000, 1/10000);
W2: integ(w1);
W3: spectrum(w2, 32*1024);
loglog(w3);yscale(w3, 0)
Same as above except the SPECTRUM
length in W3 is fixed at 16385
A parent window normally updates child (i.e. dependent) windows any time the data in the parent window changes. SETONPLOTCALC causes the parent window to trigger updates of its child windows each time the parent window plots. Additionally, child windows are presented only with the portion of the parent that is currently displayed. This design allows for automatic processing of dependent windows by scrolling through the parent window.
The header of a window with SETONPLOTCALC set displays in a different color.
SETONPLOTCALC with no mode argument returns a positive value if the current or input window has SETONPLOTCALC set, or 0 if SETONPLOTCALC is not set.