Next 23.D: Sound  Up 23: Multimedia Prev 23.B: Pictures  Contents

Specialized

§ 23.C:  Creating Graphs from Data


Another kind of multimedia you may have previously done by hand is graphing data. Unix has a variety of tools which allow you to do complex graphs quickly.

We recommend the free software Ace/GR (xvgr/xmgr) to graph two dimensional data. It is menu driven and creates publication-quality graphs. It also has several convenient features such as error bars and built-in digital signal processing. You can start xmgr by just entering its name (and then having it read in your data) or by having the data read in as xmgr starts up:

Simply enter your data into your file filename in x-y pairs. To have several graphs (data sets) on the same plot, separate the data sets with a blank line or with a text line. For example, a simple data file might look like:

Here is an example of the kind of plot you can produce with xmgr.

Prev

(Click on the image for a larger version.)

Since xmgr cannot plot three dimensional data, we recommend gnuplot for that purpose. Instructions for using gnuplot are in the guide Visualization Of Scientific Data.

One way to display your graphs on the Web is to convert them to gif format (jpeg is another possibility). To do that, have your graphing program produce (or print) its output in postscript format, and use the utility pstogif to convert the postscript to gif:

This creates a gif file filename.gif. Note that the postscript file name must end with the .ps extension.

Xmgr's default is to save print files with the name pout.dat. You can either change the name with the print setup menu in xmgr, or you can change the name using the mv command.

If you want to get really fancy, pstogif does have options; look at the man pages and try them!


Next 23.D: Sound  Up 23: Multimedia Prev 23.B: Pictures  Contents

Comments and questions to CP-unix@physics.orst.edu.