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
[email protected]
|
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
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.
- You can install XQuartz directly. See
This page provides a ".dmg" file to download and
install.
- 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
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
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
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
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.
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
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
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
- 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.
- 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
If the Makefile does not show any errors, then do
If you set the PREFIX line to a location that requires root
permissions, then enter
|
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
- 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.
- 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
If the Makefile does not show any errors, then do
If you set the PREFIX line to a location that requires root
permissions, then enter
|
Problems with Downloading or Installation
|
If you have problems with the download or installation, contact
[email protected]
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
|
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
[email protected].
|
|