Gnuplot is a widely used plotting software in the scientific community. It is a free software developed from Unix software. Because of its powerful drawing function, people from other industries gradually maintain and support this software, making it more and more popular.

\

Installation on Mac:

\

Gunplot for Mac comes in two main forms: the first is a Carbon binary file, which is probably your only option if you’re running classic Mac OS (pre-OS X). This version also runs on OS X. This is handy if you just want to be able to see the output of a gnuplot file without having to install software on your system. It doesn’t require X-Windows or other software, is easy to install, but lacks some external controls. He also has some other characteristics:

Gnuplot for Mac supports a variety of Apple-specific technologies. For example, gnuplot can use AppleScript or be logged, supports PICT and QuickTime movie formats, supports command line editors, and supports drag and drop. To run on Mac OS 8.6 only, you must have Color QuickDraw, QuickTime, CarbonLib1.1 or higher. The program was tested on Mac OS 9.0, Mac OS 9.1 and Mac OS X.

Carbon Gnuplot can be downloaded from: Download this address also contains a number of very useful tools.

     

The traditional way, of course, is source code compilation and installation. If you want to use GNUPlot seriously on Mac OS, the traditional compile-install method is recommended. Because Mac OS is a Unix system, any code that has been written for cross-platform purposes can be compiled and installed. This, of course, includes Gunplot. Source code for Gunplot official Gnuplot v. 4.0 Sources

\

With all this information from the second article in Resources, I still feel that it would be a better process to install my own gnuplot from source, maybe a little harder, but I’m willing to try. The specific installation process is recorded below.

\

Postscript: The whole installation process was beyond my imagination because of the absence of many dependency packages. And Mac OS X’s lack of package management doesn’t get solved with a yum or apt-get like Fedora or Ubuntu does. I have avoided installing package management systems on my own system, but if you prefer not to install from source, DarwinPorts or Fink should be considered. Here, the dependency packages and versions required during installation are listed.

\

Mac OS X 10.6.8, xCode installed;

Gnuplot 4.4.3

Zlib 1.2.5

     libjpegv8c

     FreeType2.4.5

     gd2.0.35

Libpdf (if you need to support output as PDF)

     

\

Specific installation process:

1. First, the system needs to install xCode and X11 library files. The main purpose of this is to install GCC. If you don’t like installing xCode, there are other ways to install only GNU development tools.

2, zlib

Decompress the package, go to the folder, and run

     ./configure –shared && make && sudo make install

3, libpng

Libpng is also dependent on libgd, but it’s already shipped with the Mac, so you don’t need to install it separately

4. Download libjpegv8c, decompress it, and run it in the directory

Export MACOSX_DEPLOYMENT_TARGET = 10.6

     ./configure –enable-shared && make && sudo make install

5. FreeType2.4.5, download and decompress the file and enter the directory for execution

     ./configure && make && sudo make install

6. Gd2.0.35, download and decompress, enter the directory, and perform step by step

     sudo ln -s /usr/X11R6/include/fontconfig /usr/local/include

     ln -s `which glibtool` ./libtool

     ./configure –with-png=/usr/X11 –x-includes=/usr/X11/include –x-libraries=/usr/X11/lib

These parameters and steps in the configure phase are to ensure that GD can find the appropriate library file. After verifying that all support is found, the following installation can proceed.

     ** Configuration summary for gd 2.0.34:

        Support for PNG library:          yes

        Support for JPEG library:         yes

        Support for Freetype 2.x library: yes

        Support for Fontconfig library:   yes

        Support for Xpm library:          yes

        Support for pthreads:             yes

\

     make && sudo make install

     ./gdtest test/gdtest.png

7. Gnuplot, download, decompress, and run in the directory

     ./configure

After execution, check to see if the output of the image class is already supported.

       jpeg terminal: yes

       gif terminal: yes (with animated gif)

       png terminal: yes

              (jpeg, gif and png terminals can use TTF fonts)     

\

     make && sudo make install

8. Install Aqua Term

\

Once you’re done, you can view the plot using gnuplot,plot sin(x)

\

\

\

References:

1, gnuplot homepage

2. Install Gunplot on Mac OS X

Installing Gnuplot on Mac OS X 10.6

4, www.libgd.org/DOC_Compili…