How do I enable the pngcairo terminal in Gnuplot

gnuplot, png, terminal

Solution

If you are running homebrew, you can install everything with just one command line

`brew install gnuplot --with-cairo`

Problem

I would like to plot a figure to PNG format (avoiding using convert), however my Gnuplot distribution does not offer the PNGCAIRO terminal. How can I install/enable it? I use Gnuplot 4.4, patchlevel 2 on Mac OS X 10.6. ``` [me]machine @ test $ gnuplot G N U P L O T Version 4.4 patchlevel 2 last modified Wed Sep 22 12:10:34 PDT 2010 System: Darwin 10.8.0 Copyright (C) 1986-1993, 1998, 2004, 2007-2010 Thomas Williams, Colin Kelley and many others gnuplot home: http://www.gnuplot.info faq, bugs, etc: type "help seeking-assistance" immediate help: type "help" plot window: hit 'h' Terminal type set to 'x11' gnuplot> set terminal pngcairo ^ unknown or ambiguous terminal type; type just 'set terminal' for a list ```

Original source