SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search Dataplot Pages

Dataplot Installation Instructions for MacOS Assuming MacPorts is Installed

Contact Information February 2024

Alan Heckert
Statistical Engineering Division
National Institute Of Standards and Technology
Gaithersburg, Md. 20899-8980
(301) 975-2899 or FTS 879-2899
Jim Filliben (deceased)

Step 1: Install Dependencies via the MacPorts Package Manager This page assumes that you have installed MacPorts. For instructions on downloading and installing MacPorts, see

As noted on the homepage.htm page, MacPorts requires that a current version of Xcode and the command line tools for Xcode be installed on your MacOS.

Note that MacPorts installs to the "/opt/local" directory. Using this separate location avoids interference with any software you may have installed to "/usr" or "/usr/local". Also, MacPorts requires that you have super user permission on your machine.

Assuming that you have MacPorts installed, you can install the following dependencies (some of these are optional).

  • gfortran/gcc

    Since Dataplot is currently built from source, installing gcc and gfortran is required. To install gcc and gfortran, enter

      sudo port install gcc

    Installing gcc should also include gfortran.

    Note that different applications for MacPorts may require different version of the compiler. It is recommend that you enter the following commands

      ls /opt/local/bin/gcc*
      ls /opt/local/bin/gfortran*

    If either gcc or gfortran does not appear without an extension (e.g., you have "gfortan-13 but not "gfortran"), then enter the following command(s)

      sudo port select --set gcc gcc-13
      sudo port select --set gfortran gfortran-13

    The "-13" identifies the version of gcc/gfortran. We recommend using the highest version listed, although Dataplot should not be particularly sensitive to the specific version.

  • X11

    Dataplot can use X11 for generating screen graphics when Dataplot is initiated from an X11 xterm window. To install X11 from MacPorts enter the commands

      sudo port install xorg xorg-libX11
      sudo port install xft2

    Although X11 is not strictly required, it is recommended that you install either X11 or Aquaterm.

  • Aquaterm

    Dataplot uses the Aquaterm library to generate screen graphics for the command line version of Dataplot when it is run from a standard MacOS terminal window. To install Aquaterm from MacPorts, enter

      sudo port install aquaterm

    Although Aquaterm can be installed independently of MacPorts, we recommend installing the MacPorts version. The Aquaterm from github is currently (as of 2024/01) only supported for the Intel chipset. The MacPorts version is supported for both Intel and M1 chipsets.

    Although Aquaterm is not strictly required, it is recommended that you install either X11 or Aquaterm.

  • GD

    The GD graphics library is used to generate plots in the jpeg, png, gif, bmp, wbmp, and tiff image formats. You can also read images in these formats. To install GD from MacPorts, enter

      sudo port install gd2

    This is an optional feature.

  • cairo

    The Cairo graphics library can be used to generate plots in a number of different formats (X11, Postscript, PDF, SVG or jpeg/png/gif). To install Cairo from MacPorts, enter

      sudo port install cairo

    This is an optional feature.

  • readline

    The readline library supports history recall with command line editing. To install readline from MacPorts, enter

      sudo port install readline

    Note that MacOS comes with a version of readline. However, Dataplot is not currently compatible with that version, so if you want to activate this feature you need to install the MacPorts version.

    This is an optional, but recommended, feature.

  • libplot

    This is an older graphics library supported under Unix/Linux. Dataplot uses libplot to support some additional graphics formats not otherwise supported (netPBM bitmap, Adobe Illustrator, binary CGM, xfig). To install libplot from MacPorts, enter

      sudo port install xorg-libXaw plotutils +x11

    This is an optional feature. Unless you have a particular need for one of the above graphics drivers you can probably skip this.

  • tcl/tk

    Dataplot implements its GUI using the Tcl/Tk scripting language.

    The ActiveState web site provides a MacOS specific version of Tcl/Tk that has a Mac look and feel. However, the Dataplot GUI does not work well with the ActiveState MacOS specific version, so the MacPorts version is recommended. To install the MacPorts version of tcl/tk, enter

      sudo port install tcl
      sudo port install tk

    If you are not interested in the GUI, you can skip this feature.

  • ghostscript

    Ghostscript is a Postscript interpreter that can be used to convert Postscript output to other formats. Specifically, it can convert Dataplot Postscript output to PDF format.

      sudo port install ghostscript

    Ghostscript is independent of Dataplot. However, since Dataplot's primary graphics output format is Postscript it can be useful to have Ghostscript installed. Likewise, it may be convenient to install one of the Postscript/PDF viewers (e.g., evince or okular)

      sudo port install evince
      sudo port install okular

Download and Unpack the Dataplot Files
Step 2: Download and Unpack the Dataplot Files The Dataplot files are available on the following github site

Select the "Clone or Download" menu and then select the "Download ZIP" text. This will save the file

Move this file to a convenient location on your system and then enter


Build Dataplot
Step 3: Build Dataplot After the unzip command, enter the command

    cd src

To use the MacOS version of the Makefile, enter

    cp Makefile.mac_macports Makefile

Check the following lines in the Makefile

  1. The "PREFIX=$(DESTDIR)/opt/local" line. This will install Dataplot to the MacPorts directories. If you want to install to a different directory (e.g., /usr/local), modify this line to the preferred location.

  2. The line "FEATURES = READLINE NCURSES GD TIFF CAIRO X11 PLOT AQUA_MACPORTS MACPORTS MACOSX_M1" specifies what dependencies you have installed.

    You should remove any features where you did not install the dependencies. If you did not install readline, remove READLINE and NCURSES. If you did not install GD, remove GD and TIFF. If you did not install CAIRO, remove CAIRO. If you did not install X11, remove X11. If you did not install libplot, remove PLOT. If you did not install Aquaterm, remove AQUA_MACPORTS.

    If your machine uses the Intel chipset, remove MACOSX_M1.

The INSTALL file provides additional detail (e.g., if you want to build a version that can handle larger data set sizes). However, in most cases you should not need to modify anything other than the PREFIX and FEATURES lines.

After making any needed modifications to the Makefile, enter


If the Makefile does not show any errors, then do

    sudo make install

If you did not set the PREFIX line to a location that requires root permissions, then you can omit the "sudo".

Problems with Downloading or Installation If you have problems with the download or installation, contact for assistance.
Test Dataplot Installation
Step 4: Test Command Line Version of Dataplot If you installed X11, open an xterm window and enter the following commands.

    device 1 x11
    call minitest.dp

If you installed Aquaterm, open a MacOS terminal window and enter the following commands.

    device 1 aquaterm
    call minitest.dp

Even if you only intend to use the GUI version, I recommend testing the command line version first since the GUI version is in fact running the command line version.

Be sure that the directory containing the Dataplot executable is in your path. For example, if you have the executable in /opt/local/bin, you can add the following line to your .cshrc file (if you use the c-shell)

    set path=(/opt/local/bin $path)
For the Bourne shell, the comparable line for the .bashrc file is
    PATH=/opt/local/bin:$PATH; export PATH
Step 4b: Testing the GUI version of Dataplot To test the Dataplot GUI, enter


Dataplot Configuration Files There are two configuration files that you may want to edit at some point.

  • The "/opt/local/lib/dataplot/dplogf.tex" file contains a default startup file that will be executed when you initiate Dataplot. This is an ASCII file containing Dataplot commands that is useful for specifying your own defaults for Dataplot. After you become more familiar with Dataplot, you may want to view this file to see if you would like to modify it for your own preferences.

    If you would like to create your own custom file , then do the following

      cp /opt/local/lib/dataplot/dplogf.tex ~/dplogf.tex

    Then edit ~/dplogf.tex using any ASCII editor. If you have a dplogf.tex file in your home directory, this will override the system version.

    How much you would like to utilize dplogf.tex is a personal preference.

  • The "/opt/local/lib/dataplot/frscript/xdpConfig" file is a configuration file for the GUI. In general, you will not need to edit this file. However, if you would like to create your own custom version, then

      cp /opt/local/lib/dataplot/frscript/xdpConfig ~/xdpConfig

    This is an ASCII file so edit ~/xdpConfig using your preferred ASCII editor. As with dplogf.tex, a copy of xdpConfig in your home directory will override the system version. See the comments in xdpConfig for guidance in editing this file.

Date created: 02/05/2024
Last updated: 02/05/2024

Please email comments on this WWW page to