Previous Next Table of Contents

16. gnuplot for botanists.

gnuplot is an axis drawing program, that takes data in ASCII format, and produces fancy graphs. You will need X11 running and a text editor.

I installed this as a Slackware package. For many people it is a standard component.

According to it's own README, the GNU in gnuplot has nothing to do with GNU. Strange, but fair enough.

16.1 /usr/lib/gnuplot/demos

There are a several demo programs, and datafiles here. Might as well try a few.

16.2 gnuplot world.dem

Up pops a flattened globe, then a transparent one, then a cylinder.

world.dem (1414 bytes)

This is the program that sequences the demo, and draws the graphs.

world.dat (17 k bytes)

This is the datafile with the approximate coastal outlines, in 3-d coordinates (latitude, longtitude). Not bad for 16k. Does it fill ??

world.cor (3485 including comments)

This is a list of points, marking city and university sites. I wonder what the MX records say ...

This file shows how you could keep comments in datafiles, whilst still sorting and auto-editing the data files.

16.3 gnuplot all.dem

This cycles through some graphs, ranging from the sinusoidal, to the experimental. Goes through all variations of a type of graph.

16.4 gnuplot.gih (120 k)

This is the online help topic documentation (except for man gnuplot). IE when you type "help topic", that ext comes from this file.

It explains how to set titles on graphs, what kind of graphs are available, how to call math exprs. how to read files of data-points, and how to generate maths functions.

You can access it using less, or an editor that allows you to search for keywords. It can be run in another VC, whilst you browse the gnuplot command lines, and data files.

16.5 defaults.ini

This file is manually included in many demos using load "defaults.ini"

16.6 Online-help

see above (gnuplit.gih)

16.7 More help

Whilst I like Slackware, I also like the original packages. If you look on disk3, or prep.ai.mit.edu, you will find /cdrom/gnu/gnuplot-3.5.tar.gz, with loads of files and docs in there.

From the example gnuplot graphs, you should see that it can produce neat graphs from files of data points, and quick command lines. Type your data in, using a similar line-per-point format. Keep the data in the correct (sorted) sequence, and create a 1 line gnuplot program, maybe add a line or two for the titles.


Previous Next Table of Contents