This is a useful function for debugging. It pops up a graph on the computer screen (using the graphing program xmgr) showing a graph of some array which you happen to want to look at.
The arguments are:
This function is a handy way to get a quick look at the contents of some
array. It writes the output to a temporary file and then starts up
xmgr, reading the input from the file. The values are evenly
spaced integers from to n-1. The values are the (subset of)
points in array[ ]. If your array contains real data, you might want
to use spacing=1. If your array contains complex data (with real
and imaginary parts interleaved) you will use spacing=2,
and make separate calls to see the real and imaginary parts. For
example if complex[0..2047] contains 1024 complex numbers, then:
graph(complex,1024,2) (view 1024 real values)
graph(complex+1,1024,2) (view 1024 imaginary values)
Note that in order not to produce too much garbage on the screen, any output or error messages from xmgr are tossed into /dev/null!