Now wait, before you brush off a command-line program, you have to understand what it is used for. gnuplot is mainly for scientific plotting, so you are not usually pushing around a bunch of data as you would in a spreadsheet. Typically, one might be wanting to plot mathematical functions such as fx = sin(2*pi*f*t)*exp(-4*t). So, if anyone can think of a better way to enter this in the computer other than a command line, let me know! (Well, I guess some might argue that hand-writing recognition would be better.)
To install gnuplot on OS/2, it's pretty much just unzip and run the executable. (Note: emx.dll is required, but nearly all OS/2 users will probably have this already.) You will likely want to add the gnuplot directory to your path in the CONFIG.SYS, as this will be important when interfacing with other programs later. The package comes with a bunch of documentation on installation and compilation and such, most of the installation notes pertain to UNIX/Linux, but there are a few scattered OS/2 notes in there. Not that it's a big loss, since there's not much to worry about with OS/2.
When you run the executable, you're put into a command-line window.
From this window, you can simply enter your commands at the prompt, or, type quit to exit the program. (Note: gnuplot is case-sensitive.) If you're worried about it being antiquated, don't! As mentioned before, this is still the preferred method of entering the information. A very expensive commercial package, Matlab, still does exactly the same thing, even though Matlab does do much more than just plot. (The latest version of Matlab that was recently released has been prettied up slightly, but it's still just a command-line window you work from.)
gnuplot is also capable of plotting discrete data. If you have a text file with columns of data, it's just a simple matter of typing the command: plot 'MyData.txt', for example, and it will plot your data (and error bars too, if you wish.) It requires that your data be separated in columns (e.g. with tabs, spaces, comma, etc,) but that's not uncommon. It would probably be a little strange if your text data weren't sorted in such a fashion!
If you're willing to put in a bit of learning effort, you'll find that gnuplot is capable of some fairly complicated stuff, including some impressive looking 3-D figures. The appropriate command to use here is splot instead of plot, but the syntax remains the same.
I couldn't figure out how to get solid-surfaces working, it just sits there "thinking" forever until I hit CTRL-C. But that, I think, is an issue with the development version (or my video drivers.) But as this plot from Petr's page demonstrates, it is capable of generating some very nice looking plots.
But, there is still a bit more! gnuplot can not only generate static plots, but also produce simple animations as well. While certainly impressive, it is more than just eye candy, and can be used to visualize parameter variations or time development of some functions. A nice demo called "animate.dem" is included in the package which will show you how it's done. Just type: load 'animate.dem' and the demo will automatically run. You're not going to be making "Shrek" with this, but it will handle data visualization. For those of you who don't usually do this, you ought to give it a shot. The world's most powerful computer is sitting on your shoulders, and you'd be amazed what kind of insights can arise when you can see a visual simulation. (Just for example, I could describe the path of a football in the air, accounting for wind-speed, ball-wobble, gravity, etc. with a very complicated equation. But any child, just by watching the path of motion, can predict exactly where to go to intercept and catch it on the ground.)
If you ever forget how to do something, help is available by typing the very cryptic command help on the command line. Just help will give you a list of topics available. If you ask for help on a command, for example help splot, it will give you a summary of what the command does and the appropriate syntax. All help information is presented on the command line window, and there is no search facility. Is this somewhat primitive? Yes. Could it be better? Yes. But hey, you know what? Matlab is exactly the same, and up until very recently, Maple and Mathematica (also two other expensive math packages) don't do very much better. I don't know why this is so, maybe this is left over 'tradition' from the UNIX world and their man pages.
At less than 3MB of disk space and freely available, you should keep this tool in your arsenal! It will easily handle much of what you ask it to do, and it's a pretty "standard" tool that's available on plenty of platforms.
The current stable version is 3.7.1, which you can find on the gnuplot FTP site (ftp://ftp.ucc.ie/pub/gnuplot/). The latest development
version, 3.8i, is not very stable (in my experience,) but since it adds quite
a few useful new features (such as drag 'n drop of fonts onto the graph
and solid surface plotting,) it may be worth your time to use the latest
version, or perhaps keep both installed. Precompiled binaries of 3.8i can
be downloaded from Petr Mikulik's gnuplot download page (http://www.sci.muni.cz/%7Emikulik/gnuplot/).
This article is courtesy of www.os2ezine.com. You can view it online at http://www.os2ezine.com/20020616/page_5.html.