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 Homebrew 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
alan.heckert@nist.gov
Jim Filliben (deceased)

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

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

Note that Homebrew has changed the installation location for the M1 chipset. For the Intel chipset, Homebrew installs to "/usr/local" while for the M1 chipset Homebrew installs to "/opt/brew". For this reason, we have created separate Makefiles for Intel and M1 chipsets.

Assuming that you have Homebrew installed, you can install the following dependencies (some of these are optional). Also, the basic command for Homebrew installations is "/opt/homebrew/bin/brew". If you have not added "/opt/homebrew/bin" to your path, then you need to use "/opt/homebrew/bin/brew" for the "brew" commands given here.

  • gfortran/gcc

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

      brew install gcc

    Installing gcc should also include gfortran.

  • X11

    Dataplot can use X11 for generating screen graphics when Dataplot is initiated from an X11 xterm window.

    Homebrew uses XQuartz for X11. You can install XQuartz in either of the following two ways.

    1. You can install XQuartz directly. See

      This page provides a ".dmg" file to download and install.

    2. You can install XQuartz using Homebrew. If you have not installed Homebrew Cask, enter

        brew cask install xquartz

      Then enter

        brew install --cask xquartz

    This should also install the xft library.

    Although X11 is not strictly required, it is currently the only way to get screen graphics with the M1 chipset. If you have the Intel chipset, you should install either X11 or Aquaterm (or both).

  • Aquaterm

    Homebrew uses the version of Aquaterm that is available on github. However, this version currently (as of 01/31/2024) only seems to support the Intel chipset. So for now, only install Aquaterm if you have the Intel chipset. To install Aquaterm from Homebrew, enter

      brew install --cask aquaterm

    Although Aquaterm is not strictly required, it is recommended if you have the Intel chipset.

  • 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 Homebrew, enter

      brew install gd

    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 Homebrew, enter

      brew install cairo

    This is an optional feature.

  • readline

    Homebrew uses the version of readline that comes with MacOS. Dataplot is currently incompatible with this version, so do not install readline if you are using Homebrew.

  • 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

      brew install plotutils

    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 Homebrew version is recommended. To install the MacPorts version of tcl/tk, enter

      brew install tcl-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.

      brew 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. For example, evince can be installed with

      brew install evince

    The okular viewer does not seem to be currently supported in Homebrew.

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

    dataplot-master.zip

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

    unzip dataplot-master.zip

Build Dataplot
Step 3a: Build Dataplot for the Intel Chipset If you have the Intel chipset, after the unzip command enter the commands

    cd src
    cp Makefile.mac_homebrew_intel Makefile

Check the following lines in the Makefile

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

  2. The line "FEATURES = GD TIFF CAIRO X11 PLOT AQUA HOMEBREW" specifies what dependencies you have installed.

    You should remove any features where you did not install the dependencies. 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.

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

    make

If the Makefile does not show any errors, then do

    make install

If you set the PREFIX line to a location that requires root permissions, then enter

    sudo make install
Step 3b: Build Dataplot for the M1 Chipset If you have the M1 chipset, after the unzip command enter the commands

    cd src
    cp Makefile.mac_homebrew_m1 Makefile

Check the following lines in the Makefile

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

  2. The line "FEATURES = GD TIFF CAIRO X11 PLOT HOMEBREW" specifies what dependencies you have installed.

    You should remove any features where you did not install the dependencies. 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.

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

    make

If the Makefile does not show any errors, then do

    make install

If you set the PREFIX line to a location that requires root permissions, then enter

    sudo make install
Problems with Downloading or Installation If you have problems with the download or installation, contact alan.heckert@nist.gov 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.

    dataplot
    device 1 x11
    call minitest.dp
    exit

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

    dataplot
    device 1 aquaterm
    call minitest.dp
    exit

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 the default locations, enter the following

    set path=(/opt/homebrew/bin $path) (for M1 chipset)
    set path=(/usr/local/bin $path) (for Intel chipset)

For the Bourne shell, the comparable line for the .bashrc file is

    PATH=/opt/homebrew/bin:$PATH; export PATH (for M1 chipset)
    PATH=/usr/local/bin:$PATH; export PATH (for Intel chipset)
Step 4b: Testing the GUI version of Dataplot To test the Dataplot GUI, enter

    xdataplot

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

  • The "/opt/homebrew/lib/dataplot/dplogf.tex" (or "/usr/local/lib/dataplot/dplogf.tex" for the Intel chipset) 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/homebrew/lib/dataplot/dplogf.tex ~/dplogf.tex or
      cp /usr/local/lib/dataplot/dplogf.tex ~/dplogf.tex or

    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/homebrew/lib/dataplot/frscript/xdpConfig" (or "/usr/local/lib/dataplot/frscript/xdpConfig if you use the Intel chipset) 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/homebrew/lib/dataplot/frscript/xdpConfig ~/xdpConfig or
      cp /usr/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 alan.heckert@nist.gov.