Install gnuplot in Mac OS X

In this post I will cover how to install gnuplot once your homebrew installation has finished.

Gnuplot is a very handy and powerful plotting program.

Homebrew packages can have a nnumber of diffrent installation options. What’s available can be seen by running the command “brew options package-name”.\

In gnuplot case, type

$ brew options gnuplot

This returns a list of flags that can be added to the installation command

For example, if you wanted to use X11 terminal for your plots, you would run

$ brew install gnuplot –with-x11

Note that, in order to use the x11 terminal, you need to install Xquartz beforehand.

Wx is a slightly more functional terminal that can be installed with

$ brew install gnuplot –with-x11 –with-pdflib-lite –with-cairo –with-wxmac

This command will also install both wx and x1 terminals, as well as the pdf backend.

If you change your mind and need to install gnuplot with different options, you first need remove the previous version  with “brew uninstall gnuplot”)