Yesterday I started some ramblings about plotters. I am sorry to disappoint Alex who was looking foward to hearing about devious schemers. Instead, we have some brief thoughts about mathematical environments, plot libraries, and equation graphers. Tomorrow(ish) will be GUI apps.
Mathematical Environments. Many folk swear by gargantuan packages that provide a programming environment, algorithm libraries, graphics utilities, algebraic manipulation, and so on. Popular packages include IDL, Matlab, Maple and Mathematica . These are very powerful, but with a bit of a learning curve, and of course they all cost lots of dosh. The only free, open source, alternative I am aware of that tries to be a complete Matlab-like replacement is Sage. I haven’t tried this out myself, and would be interested to hear of experiences. The other thing worth mentioning is R which started life as a statistics package and seems to have ballooned into an all-singing all-dancing kind of thing. It has some fans, who have emerged in my recent comment stream, but I haven’t tried it yet. Well, I started trying to read some documentation and nearly lost the will to live.
Plot Libraries. For astronomers at least, the grandaddy is PGPlot, started in 1983 by Tim Pearson and still in everyday use by lots of people. The latest version is 5.2.2 from 2001. It is a library of primitive routines, callable in Fortran or C. Several people have written interactive front ends – WIP, PONGO, and QDP (see Part IV). PLplot is intended as an updated version of PGPLOT. It has bindings to a very wide range languages, including C, Fortran, Python, Perl, Java, C++, and several others. If Java is your thing, you might also want to look at JFreeChart. If Python is your thing you might want Pyx. It has high level things as well as primitives, and because Python has an interactive mode, you can use it in somewhat the manner you might use Gnuplot. However, as you can see from this example it is distinctly less streamlined and friendly than Gnuplot. Matplotlib is another Python library with both primitives and high level stuff, and ambitions to be a complete environment, a la Matlab. It looks good, but I couldn’t make it work… There are links to lots more Pythonesque bits and pieces here. So if you want to include plotting in your own programs, there is a lot of choice, but it looks to me like the standard choice these days is PLplot .
Equation Graphers. If all you want is a quick plot of a mathematical function, you can do with this with Gnuplot and cousins, but you are likely to want to explore it – pan and zoom, read out values. In this case an interactive GUI style application makes sense. On the Mac you have this pre-loaded with Grapher, which started life as Graphing Calculator, still independently available here for Mac and Windows. If you want an entertaining hour, you can listen to Ron Avitzur telling the strange story of this application. (There is also a written version of this story.) For Linux folk, there is the wonderfully easy Lybniz – why isn’t there a Macports version ? Another nice lightweight free MacApp is Edengraph but it can’t do some things that Grapher can – like 3D functions, vector fields, independent axis adjustment. Two fairly glitzy commercial applications are A&G Equation Grapher, its cousin Graphing Calculator 3D and Golden Software Grapher. Graphing Calculator 3D has a free version.
Enough for now. Part III will be about GUI-style plotting applications.