Simple example
1: Introduction 2: Simple example 3: Fancy example 4: Running Gri 5: Programming Gri 6: General Issues 7: X-Y Plots 8: Contour Plots 9: Image Plots 10: Examples 11: Handling Data 12: Gri Commands 13: Gri Extras 14: Evolution of Gri 15: Installing Gri 16: Gri Bugs 17: System Tools 18: Acknowledgments 19: License 20: Newsgroup 21: Concept Index |
2: Simple Gri Program and How to Run itThis chapter introduces Gri with a common example: a x-y graph. The example is discussed in detail later see X-y Plots. The data files and command files here and throughout the manual should be available to you in a directory `.../gri/examples' on unix machines.2.1: Gri Command fileHere is a Gri command file to plot a linegraph of a set of (x,y) data, stored as space-separated columns in a file called `example1.dat':
" '. This allows `sed '
system commands to work as expected; see System.)
The other lines are Gri command lines; see X-y Plots. for more
explanation.
2.2: Data FileThe data file `example1.dat' looks like:
2.3: Running The Command FileType `gri example1.gri' at the system prompt. Gri will create a PostScript file called `example1.ps'. For details on running Gri see Invoking Gri..2.4: Output GraphThe output PostScript file is called `example1.ps'. It looks something like the miniature shown above.![]() To view Gri output, use your favorite PostScript previewer; see Viewing. Note that in the above example, Gri automatically chose reasonable scales for the axes, based on the range of the data. The next chapter illustrates that Gri also gives you control over such things. |