Setting up Gnuplot on a Mac
Nov 29, 2009 Visualization
I wrote these directions down over a year ago, so they could be a bit out of date. I’d like a permanent record though since some of the steps are a bit tricky…
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)
November 30th, 2009 at 2:33 pm
[...] previously under Linux without any problems, but to work on a Mac you need to first setup gnuplot (which can be a pain), plus you need the fig2dev utility to actually produce the final output files. Luckily, I found a [...]