Plotting a Graph




Document: Software Engineering 1: Lab Exercises

next Session 9: Week 18/19: Encryption
up Hints
gif Command Line Redirection

Plotting a Graph

Sometimes you may find it useful to view the output of a program in the form of a graph. There are a variety of ways of doing this. One simple way is using a utility program, provided on the PC's in the CAE Lab, called graph. This program should be run as a full-screen MS-DOS application. To do this, first open an MS-DOS window by double clicking on the relevant icon in Program Manager. Then make this window take over the full screen by pressing Alt-Enter (i.e. press and hold the Alt key while you press the Enter key also).

If your program's output has been stored in a file called out.txt, you can then see a graph of this simply by giving the following command:

        graph out.txt

Note that graph expects each line of its input file to contain just two numbers. The first is taken as the "x" co-ordinate, and the second as the "y" co-ordinate, of a single point to be plotted. graph will automatically scale the axes in order to fit in all the data points.

You can exit from the graph program by pressing the Esc key. You can make the MS-DOS application revert from full-screen to a window by pressing Alt-Enter again.




Document: Software Engineering 1: Lab Exercises

next Session 9: Week 18/19: Encryption
up Hints
gif Command Line Redirection



McMullin@eeng.dcu.ie
Tue Apr 30 14:15:37 GMT 1996