gnuplot is a widely used scientific plotting program from the unix world that is free and open source. It can produce most of the types of plots that a scientist might require on a dazzling array of output devices.
There are two main forms of gnuplot available for the Mac. There is a self-contained Carbon binary that may be your only choice if you are running a classic (pre-OS X) Macintosh system. This also runs on (at least some versions of) OS X, and may be convenient if you just need to see the output of a gnuplot command file, for instance, but don't need a permanent installation. This does not require X-Windows or any external viewer, and is easy to install, but it's not as good for external control (from gnuplot-py, etc.) as the standard gnuplot. However, this version has some unique features:
“gnuplot for Macintosh supports of number of Mac-specific technologies. In particular, gnuplot is AppleScriptable and recordable, supports PICT and QuickTime movie formats, incorporates a built-in gnuplot command file editor, and is drag-and-drop savvy. [....] it will run only on Mac OS 8.6 and above, must have Color Quickdraw, QuickTime, and CarbonLib 1.1 or above. The application has been tested under MacOS 9.0, MacOS 9.1, and MacOS X”
Download links for the carbon gnuplot have a history of appearing and disappearing; with the help of visitors to this page I'll try to keep a pointer here to a working link from a trustworthy source. If I list a link here that means that at least I have downloaded the program from that location and verified that it seems to work (on an OS X system). At the moment I know of no source for the Carbon gnuplot, and have not had any inquiries about it for over a year.
I recommend installing the traditional unix gnuplot for serious use on OSX. Since OSX is a unix system, any unix program that was written to be reasonably portable can be compiled to run on it. This includes programs such as gnuplot that, on traditional unix systems, produced graphical output with the X Window System, by installing a version of the X Window System on the Mac (or using the one that may be built-in). However, some graphical unix programs can be made to work with OSX's native display system (Aqua); gnuplot is one of these.
Compiling gnuplot to run on recent versions of OS X can be a problem, as Apple ships their system with various broken or outdated libraries. Your best bet may be either to use MacPorts, which is reported to work with OS X 10.7.x, or to install the binary Octave package, which includes a binary of gnuplot. To get this to work on OS X 10.7.3 or later, apply the fix described on that page. Octave is a very nice system that you might want to have anyway.
Another source for a slightly older binary of gnuplot is Maxima, the excellent open-source symbolic algebra system. Maxima has plotting built-in using gnuplot; binaries for OS X contain gnuplot binaries.
The official gnuplot v. 4.0 sources compile without modification on OS X, and there is also a binary available here for PPC macintoshes. This binary works on Intel Macintoshes as well, but sometimes refuses to run on recent installations. To get it to work, try the fixes described in the comments. It works with X11 or AquaTerm, and in fact requires the latter to be installed. The readme document that comes with the binary download claims that it will not run unless X11 is also installed, but this is not true; fortunately you can run this gnuplot without needing to install X Windows.
I suggest you read up on the new features in v.4.0, a major upgrade. One significant enhancement is the incorporation of the pm3d splot mode, which has been an unofficial part of gnuplot for some time. This lets you plot color-mapped surfaces.
You can get Aquaterm sources and binaries (which can be used with more than just gnuplot), here. This has also undergone a major revision, so if you have a version < 1.0 you should upgrade.
This binary seems to work fine on OSX 10.3.4 (Panther) on a couple of different G3 and G4 systems. I am interested in other's experiences with this software on a variety of configurations, and in any other relevant information. Please email me with any notes you think might be useful to others, and I'll include your comments here (tell me if you prefer to be anonymous). Note that the both official binary and the one that you can build from source do not include all the terminals that may be available on other systems; I have no information about this, but would welcome comments from readers who either know why or know how to get support for other output devices, as I sometimes get email asking about this.
The new version of Aquaterm seems to be faster than previous ones, so I've been using this now for moderately large 3d plots, which I had been doing with x11. You do get some mouse control with the x11 terminal, however, that you do not get with Aquaterm: you can rotate and scale 3d plots, and annotate and zoom 2d plots. To get a summary of interactive controls on your console, type “h” when the plot window has focus.