Gnuplot is used for making graphs. If you try to compile it normally you will get some errors. Here is how to make it work:
- Download and install aquaterm – this is a program which will handle the actual plotting graphics for gnuplot.
- Download the source code for gnpulot – I am using 4.2.3.
- Extract the source code somewhere (double click the file in finder or use “tar xzf FILENAME” from a terminal.
- Open a terminal and change to the extracted source directory.
- Configure the source code distribution by running: ./configure –with-readline=builtin You must use the –with-readline flag because Mac OS X comes with a bad version of this library. More details here.
- Build the source code by running make
- Install the resulting package by running make install
- You are done!
You can test it out by running gnuplot at the terminal and then typing plot sin(x)
Apache with PHP
This isn’t too sciency, but still on the techy side. OS X Leopard comes with an apache server which can be enabled in the Settings->Sharing panel. However, by default PHP is not enabled. To change that, you need to modify the httpd.conf file. On my system it was in/private/etc/apache2/httpd.conf. If you run apachectl -V it will print where the file is located. You need to uncomment the line in the file referencing php5. After that, run apachectl restart and you will be all set!