Credits | Overview | Plotting Styles | Commands | Terminals
--- | --- | --- | --- | ---

## watchpoints

One or more watchpoints may be set for each component plot in a plot command. All watchpoint targets and hits from the previous plot command are summarized by the command show watchpoints.

Example:

         plot DATA using 1:2 smooth cnormal watch y=0.25 watch y=0.5 watch y=0.75
         show watchpoints

             Plot title:     "DATA using 1:2 smooth cnormal"
               Watch 1 target y = 0.25         (1 hits)
                       hit 1   x 50.6  y 0.25
               Watch 2 target y = 0.5          (1 hits)
                       hit 1   x 63.6  y 0.5
               Watch 3 target y = 0.75         (1 hits)
                       hit 1   x 68.3  y 0.75

The coordinates of all points satisfying the first watchpoint (y=0.25) are stored in an array WATCH_1. The points satisfying (y=0.5) are stored in an array WATCH_2, and so on.

Each hit is stored as a complex number with x as the real component and y as the imaginary component. So the first hit of watchpoint 2 has x = real(WATCH_2[1]) y = imag(WATCH_2[1]). In this example only the x coordinates of the hits are interesting, as the y coordinates will always match the corresponding target y value. However if the watchpoint target is a z value or a function f(x,y), neither the x or the y coordinate of a hit is known in advance.