next up previous contents
Next: Function: sgraph() Up: GRASP Routines: General purpose Previous: Function: graph_double()   Contents

Function: graph_short()

0 void graph_short(short *array,int n)

This is a useful function for debugging, and exactly like the function graph(), except that it's intended for short integer values. 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:

array: Input. The array that you want a graph of.
n: Input. The number of array elements that you want to graph. The elements graphed are array[0..n-1].

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 $x$ values are evenly spaced integers from $0$ to n-1. The $y$ values are the points in array[ ].

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!

Authors: Bruce Allen, ballen@dirac.phys.uwm.edu
Comments: None.


next up previous contents
Next: Function: sgraph() Up: GRASP Routines: General purpose Previous: Function: graph_double()   Contents
Bruce Allen 2000-11-19