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 SED Pages

Downloading DATAPLOT for OS X 10.5 (Leopard)

Contact Information April 2012

Alan Heckert
Statistical Engineering Division
National Institute Of Standards and Technology
Gaithersburg, Md. 20899-8980
(301) 975-2899
alan.heckert@nist.gov
Jim Filliben
Statistical Engineering Division
National Institute Of Standards and Technology
Gaithersburg, Md. 20899-8980
(301) 975-2855
james.filliben@nist.gov

Introduction This page contains the intstructions for downloading and installing Dataplot on version 10.5 (Leopard) of the OS X operating system.

NOTE: Given the age of this version of the operating system, this version is no longer supported. That is, there will be no updates and we will not respond to issues with the installation.

There are separate download files for power Mac and intel-based Mac's. We would like to acknowledge Franc Brglez for providing an intel-based Mac platform for us to build and test the intel-based executable. The download files contain both a pre-built executable file and the source code in case you need to build from source.

Be aware that this is a "Unix/X11" port as oppossed to a "native" OS X application. There are two ways you can run Dataplot under OS X.

  1. You can run Dataplot in a traditional command line mode (this will be referred to as the command line version).

    The command line version can be run from either a standard OS X terminal window or an X11 terminal window.

  2. Alternatively, you can run a Graphical User Interface (GUI). The GUI for Dataplot is written using the Tcl/Tk scripting language (we will say more about this below).
Prerequisites
gcc/gfortran, X11, Aquaterm, and Tcl/Tk Dataplot requires several external programs be installed. Specifically,
  1. gcc, gfortran - even if you install the pre-built Dataplot executable, you need the run time libraries for the gcc and gfortran compilers. Most systems will probably have gcc already installed. It is less likely that the gfortran compiler is installed.

    If you do not already have gfortran installed, you can download it from http://hpc.sourceforge.net/.

  2. X11 - Dataplot requires that X11 be installed on your OS X system.

    The Apple web site provides further information for installing and running X11 under OS X. This page also contains a good introduction to using X11 on OS X.

  3. Aquaterm - The February 2008 version of Dataplot added an Aqua driver for screen graphics. This means you can now run the command line version of Dataplot in a standard terminal window (previously you had to run in an X11 window if you wanted screen graphics).

    Dataplot implements the Aqua driver using the Aquaterm library. You can download Aquaterm from the Aquaterm web site.

  4. Tcl/Tk - As mentioned above, the Dataplot GUI is implemented using the Tcl/Tk scripting language. As there are other applications that use Tcl/Tk, you may want to check if to see if it is already installed. Look for either "/usr/local/bin/wish" or "/usr/bin/wish". If one of these exists, then Tcl/Tk should already be installed.

    Tcl/Tk is an open source scripting language that is supported on multiple platforms. There are two primary sources for downloading and installing Tcl/Tk for OS X:

    • Tcl/Tk Aqua Batteries-Included can be downloaded from the SourceForge web site.

      This is the version I am currently running on my own Mac. The Dataplot Tcl/Tk scripts currently only use the core Tcl/Tk (i.e., no packages).

    • The ActiveState web site has a version of Tcl/Tk that has been optimized for the Mac OS X platform.

    You should be able to run Dataplot with either of these implementations. However, be aware that they install Tcl/Tk in a different directory.

Downloading and Installing Dataplot Files
Assuming that the prerequisite software has been installed, you can proceed with the downloading and installation of the Dataplot files.
Step 1: Select Root Directory for Dataplot Installation The first step is to select the "root" directory for the Dataplot installation. Although you can make this any directory that is convenient to you, we recommend using one of the following choices:

  • /usr/local - this is the recommended choice if you want to make Dataplot available to multiple users on your system. This choice requires that you have administrator priveleges on your system.

  • /Users/name/dataplot - here "name" refers to your user name on your local system. This is a convenient choice if you are only installing Dataplot for your own use. Administrator priveleges are not required if you install Dataplot under your own directory space.

Whatever directory you choose, we will refer to this as the Dataplot root directory in the discussion below.

Step 2: Download the File The next step is to download the Dataplot installation file. Note that there are separate files for the power mac and for intel-based Mac's. In the discussion below, it is assumed that you downloaded this file to the Dataplot root directory.
  1. For a power mac (G4/G5) system, download the file dataplot.macosx_power_mac.tar.gz.

  2. For an intel-based system, download the file dataplot.macosx_intel.tar.gz.
Step 3a: Unpack the File - Power Mac System For a power mac system, enter the following commands
    gunzip dataplot.macosx_power_mac.tar.gz
    tar -xvf dataplot.macosx_power_mac.tar
If you are installing in "/usr/local", you need to use the sudo command:
    sudo gunzip dataplot.macosx_power_mac.tar.gz
    sudo tar -xvf dataplot.macosx_power_mac.tar
The sudo command will prompt for your administrator password.

After you unpack the download file, you should see the following files and sub-directories in the Dataplot root directory:

    edit_files
    README
    bin/
    lib/dataplot/
    src/
The bin directory contains the Dataplot executable and scripts for running the command line and GUI versions of Dataplot. The lib/dataplot directory contains the auxillary files (the online help files, sample data files, the Tcl/Tk scripts, and so on). The src directory contains the source code and a script file for building Dataplot. The README file gives the link to the web page containing the installation instructions (i.e., this web page). The edit_files contains an edit script that will discussed below.

In the bin directory, you will see a file "dataplot" and a file "dataplot" and a file "dataplot.power_mac.05_14_2009.exe" (the "05_14_2009" may be some other date). The file "dataplot.power_mac.05_14_2009.exe" is the actual Dataplot executable and the file "dataplot" is a script that sets some environment variables and then runs Dataplot.

Step 3b: Unpack the File - Intel-based System For an intel-based system, enter the following commands
    gunzip dataplot.macosx_intel.tar.gz
    tar -xvf dataplot.macosx_intel.tar
If you are installing in "/usr/local", you need to use the sudo command:
    sudo gunzip dataplot.macosx_intel.tar.gz
    sudo tar -xvf dataplot.macosx_intel.tar
After you unpack the download file, you will have the following sub-directories:
    edit_files
    README
    bin
    lib/dataplot
    src
The bin directory contains the Dataplot executable and scripts for running the command line and GUI versions of Dataplot. The lib/dataplot directory contains the auxillary files (the online help files, sample data files, the Tcl/Tk scripts, and so on). The src directory contains the source code and a script file for building Dataplot. The README file gives the link to the web page containing the installation instructions (i.e., this web page). The edit_files contains an edit script that will discussed below.

In the bin directory, you will see a file "dataplot" and a file "dataplot" and a file "dataplot.macosx_intel_06_02_2009.exe" (the "06_02_2009" may be some other date). The file "dataplot.macosx_intel_06_02_2009.exe" is the actual Dataplot executable and the file "dataplot" is a script that sets some environment variables and then runs Dataplot.

Step 4: Post Installation The Dataplot root directory contains the file "edit_files". This is a script file that edits several files in the Dataplot installation to reflect the paths for Dataplot and Tcl/Tk on your local platform.

Edit the file "edit_files" using the ASCII editor of your choice. Look for the lines starting with

    set prefix_cur =
    set prefix_tcl_cur =
These define the Dataplot root directory and the Tcl/Tk root directory on your local platform. Note that any "/" character shoud be entered as "\\\/" (this is to give it the proper form for the sed command which is used to implement the edits). After editing the file, enter
    ./edit_files

If you enter these values incorrectly before you run the "./edit_files" script, then you need to manually edit the following files:

    bin/dataplot - change the line starting with "set zzzzdp =" to reflect the correct path for the Dataplot root directory

    bin/xdataplot - change the lines starting with "set zzzzdp =" and "set zzzztcl =" to reflect the correct paths for the Dataplot root directory the Tcl/Tk root directory, respectively.

    lib/dataplot/frscript/xdp - modify the first line of this file to point to the correct location for the "wish" program on your system (it should typically be either "/usr/local/bin/wish" or "/usr/bin/wish").

    lib/dataplot/frscript/xdpConfig - change the lines starting with "dataplot unix" and "library unix" to reflect the correct location on your local system.

You also need to add the Dataplot "bin" directory to your default path. For example, if you installed the Dataplot files in "/Users/heckert/dataplot" and you run the c-shell or t-shell, then you can add the line

set path=($path /Users/heckert/dataplot/bin)

to your .cshrc file. If you run the bash shell, then add the lines

    PATH=/Users/heckert/dataplot/bin:$PATH export PATH
to your .bashrc file.

Since many sites have special customizations for these files, we do not do this automatically. Also, this does not take effect until you reboot your system. You can enter these commands manually if you do not want to reboot.

Step 5: Test the Command Line Executable The command line version of Dataplot can run in either a standard Aqua terminal window or in an X11 terminal window.

To test the command line version in a standard Aqua terminal window, enter the following commands

    dataplot
    device 1 aqua
    call minitest.dp
    quit
To test the command line version for X11, open an xterm window and enter the following commands
    dataplot
    device 1 x11
    call minitest.dp
    quit
Step 6: Test the GUI Version If you installed the Source Forge Tcl/Tk package, you should intitiate the Dataplot GUI from an xterm (X11) terminal window. If you installed the Active State Tcl/Tk package, you can initiate the Dataplot GUI from either an xterm terminal window or from a standard Aqua terminal window.

To test the Dataplot GUI version, open an appropriate terminal window and enter the command

    xdataplot
This should bring up the GUI. You should see six windows.
  1. A top level window containing the menus (e.g., Files/Data, Plot).
  2. The upper left window is where Dataplot alphanumeric output is generated.
  3. The upper right window ("Graph") is where Dataplot graphs are generated.
  4. The lower left window stores the Dataplot commands that have been issued.
  5. The lower right window is a data spreadsheet.
  6. The window labeled "Command Line" allows you to enter Dataplot commands directly.
Click the "Exit" button on the top right menu window to close the GUI.

If the Dataplot GUI does not come up correctly, the problem is usually that the paths to the Tcl/Tk software are not set correctly.

Update Executables
Downloading Most Recent Executables If the version of the Dataplot executable in the "bin" directory is dated "06_13_2009" (e.g., "dataplot.macosx_intel.06_13_2009.exe" for the Intel-based Mac), the Dataplot GUI will not work. You can download a corrected executable without redoing the entire installation.

Copy this file to whatever "bin" directory you are using on your system. Then use "gunzip" to uncompress the file. Use any ASCII editor to modify the "bin/dataplot" file to change the last line to point to this new Dataplot executable. You may delete the previous executable if you like.

If you are running the command line version of Dataplot, you may want to enter the command

    SET PROMPT ADVANCE ON
If you are running the GUI version, this must be set to OFF (this is the default in the corrected executable).
Runtime Libraries for gfortran If you do not have the gfortran compiler installed on your system, you may need to download the runtime library and install it to the "/usr/local/lib" directory.

  • For an intel-based system, download the file intel_gfortran_runtime.tar.gz.

    To install these files, do the following:

    • sudo cp intel_gfortran_runtime.tar.gz /usr/local/bin
    • sudo cd /usr/local/bin
    • sudo gunzip intel_gfortran_runtime.tar.gz
    • sudo tar -xvf intel_gfortran_runtime.tar.gz

    This will create several files that begin with "libgfortran".

Copy this file to whatever "bin" directory you are using on your system. Then use "gunzip" to uncompress the file. Use any ASCII editor to modify the "bin/dataplot" file to change the last line to point to this new Dataplot executable. You may delete the previous executable if you like.

If you are running the command line version of Dataplot, you may want to enter the command

    SET PROMPT ADVANCE ON
If you are running the GUI version, this must be set to OFF (this is the default in the corrected executable).
Source Installation
Building from Source If you are unable to use the pre-built Dataplot executable, then you can build Dataplot from the source code.

Check the comments in the file "src/build_gfortran" before attempting the source build. Make any needed changes to the build script and then enter the command

    ./build_gfortran
The build can use several external libraries if they are available. Specifically, it can use the GD library (for generating jpeg, png, and gif format graphics files), the libplot library (from the Plotutils library), and version 6 of the readline library (for command line editing and history recall). I generally recommend that you set these to "off" on the first pass. Then if these libraries are available on your system, you can try turning them "on".
Remove Files
Remove Source Directory Once you have a working version of Dataplot, you can optionally remove the source directory or archive it to a tar file. To remove the source directory, enter the following command (from the Dataplot root directory)
    rm -r src
To archive the source files, enter the following commands (from the Dataplot root directory)
    tar -cvf dataplot_src.tar src
    gzip dataplot_src.tar
    rm -r src
You can also delete the "edit_files" and "README" files if you like.
Problems with Downloading
Installation Problems If you have problems with the installation, contact Alan Heckert for assistance.

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 04/07/2012
Last updated: 06/27/2014

Please email comments on this WWW page to alan.heckert@nist.gov.