Install Gnuplot Mac

The installation on Linux can be done through the different package managers as follows. Arch $ sudo pacman -S gnuplot Debian and Ubuntu $ sudo apt-get update $ sudo apt-get install gnuplot CentOS / RedHat $ sudo yum check-update $ sudo yum install gnuplot Fedora $ sudo dnf check-update $ sudo dns install gnuplot Mac OSX Using Homebrew. The easiest way to install gnuplot on mac is to get the DMG file of Gnuplot, which is included in the DMG file of Maxima or Octave. Put the file in /Applications, and in your.bashprofile add a line. Gnuplot for mac free download. Gnuplot A famous scientific plotting package, features include 2D and 3D plotting, a huge number of output f.

Binary versions of Gnuplot for OS X/macOS. These are primarily intended for users who normally work on Linux and wish to replicate their tools on a Macintosh.

Quick two-step summary:

  • Install X11/XQuartz.
  • Install Gnuplot

Note for users of the 'png' terminal: On some versions of OS X, such as Catalina, the 'Arial' font has been moved and you will receive an error message when you do 'set terminal png'. To fix this, issue the following command before starting gnuplot:

export GDFONTPATH=/Library/Fonts:/Library/Fonts/Microsoft:/System/Library/Fonts:/System/Library/Fonts/Supplemental


  • Compiled on OS X 10.15.6 (Catalina).
    Versions up to 5.2.8 were compiled on OS X 10.11.6 (El Capitan) and were confirmed to work also on macOS 10.13 (High Sierra), 10.14 (Mojave), and 10.15 (Catalina).
  • Prior to installing this, you need to install X11/XQuartz.
  • The versions provided here include the GNU Readline library.
  • In addition to the standard terminals, the PDF terminal is included as well, which uses the PDFLlib Lite library. To my understanding, this link to the source code satisfies the PDFlib Lite license requirements. Note: you do NOT need to download this library to use the gnuplot packages below.
  • In version 5.2.5 and up, I have also included the GIF, JPEG and PNG terminals. All libraries needed are included; please let me know if you encounter difficulties.
  • Simply download the package from one of the links below and install. You can then invoke gnuplot from a terminal window via /usr/local/bin/gnuplot
  • Current version (recommended):
    • 5.4.1 (December 15, 2020)
  • Older versions (versions prior to 5.2.5 do not include the PNG, JPEG and GIF terminals)
    • 5.4.0 (September 23, 2020)
    • 5.2.8 (December 2, 2019)
    • 5.2.7 (May 31, 2019)
    • 5.2.6 (January 1, 2019)
    • 5.2.5 (October 7, 2018)
  • Information for the technically inclined: to facilitate installation and improve portability, the gnuplot binary was statically linked to the readline, gd, png16, freetype, fontconfig, and PDFlib-lite libraries.
  • If you receive an error message 'dyld: Library not loaded: /opt/X11/lib/libfontconfig.1.dylib', please make sure you have installed the most recent version of X11/XQuartz.

Retrieved from ''



This section provides an overview of what gnuplot is, and why a developer might want to use it.

Install Gnuplot Mac

It should also mention any large subjects within gnuplot, and link out to the related topics. Since the Documentation for gnuplot is new, you may need to create initial versions of those related topics.


VersionLast patchlevelLast Release Date

Basic introduction to programming language's rules

From the gnuplot 5.0 official online documentation:

The command language of gnuplot is case sensitive, i.e. commands and function names written in lowercase are not the same as those written in capitals. All command names may be abbreviated as long as the abbreviation is not ambiguous. Any number of commands may appear on a line, separated by semicolons ; . (T. Williams, C. Kelley - gnuplot 5.0, An Interactive Plotting Program)

Some examples of these basic rules are

1. A case sensitive language

Typing lowercase-defined commands in uppercase will generate an invalid command warning.

Also the N variable will be different from the n one. M365 business voice pricing.

2. Abbreviations

You can find an almost complete list of abbreviations here. Anyway the first three letters of any command in gnuplot work always as abbreviations. Some commands allows also a more powerful contraction. A little example is given below.

where p stands for plot , rep for replot and q for quit .

3. Separators

The symbol used to separate commands on a singe line is ;

set title 'My First Plot'; plot 'data'; print 'all done!'


Comments are supported as follows: a # may appear in most places in a line and gnuplot will ignore the rest of the line. It will not have this effect inside quotes, inside numbers (including complex numbers), inside command substitutions, etc. In short, it works anywhere it makes sense to work. (Ibidem)

Just remember the simple 'anywhere it makes sense to work' rule.

4. Extending commands

Install Gnuplot Mac

Commands may extend over several input lines by ending each line but the last with a backslash ( ). The backslash must be the last character on each line. The effect is as if the backslash and newline were not there. That is, no white space is implied, nor is a comment terminated. Therefore, commenting out a continued line comments out the entire command. (Ibidem)

For example, to split plot command on multiple lines,

will plot the same as

A little note on 'commenting out a continued line comments out the entire command'. If you type the command

an error will occur:

So it's better to be careful and respect the rule 'anywhere it makes sense to work' while using # comments.

Installation or Setup

Gnuplot is a portable command-line driven graphing utility. This example will show how to setup gnuplot in the various platforms.


  1. Download the latest version of the installer from gnuplot site.

  2. Run the downloaded file and allow it to run as administrator if requested

  3. On the setup window select the language and follow the instructions on screen.

  4. (optional) During the installation you may select the gnuplot to be added to the PATH that will allow you to run commands from anywhere on the command line. If you choose not to do so you may add it manually later or cd to the gnuplot installed directory prior to running commands.

The default installation location of gnuplot on Windows is C:Program Files (x86)gnuplot

NOTE: the filename will be of the format: gp<version>-win32-mingw.exe


The installation on Linux can be done through the different package managers as follows.


Debian and Ubuntu

CentOS / RedHat



Using Homebrew

Using MacPorts

Test the installation

Install Gnuplot Linux

After installing gnuplot it's a good idea to run a simple example to ensure all is working fine.

  1. Open your terminal
  2. Type gnuplot .
  3. Your prompt should now change to gnuplot>
  4. Type: plot sin(x)

Gnuplot For Mac Os

If all is well you should see now a sin(x) graphic generated by gnuplot.

Note: if you are on Windows and have not added gnuplot to your PATH you' ll need to navigate to the <gnuplot_install_path>bin folder. The default location is: C:Program Files (x86)gnuplotbin

How To Install Gnuplot

Install Gnuplot Mac Catalina