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

Downloading DATAPLOT for Mac OS X

Contact Information February 2008.

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

Introduction This page contains the intstructions for downloading and installing Dataplot on the Mac OS X operating system.

My Mac OS X platform is a Power Mac (i.e., non-Intel) running Mac OS X 10.4 (tiger). If you have a compatible system, you can install a pre-built Dataplot executable (i.e., a binary install). If not, you need to download the source (i.e., a source install).

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

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

    Note that the command line version can be run from either a standard Mac 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
g77, X11, Aquaterm, and Tcl/Tk Dataplot requires several external programs be installed. Specifically,
  1. g77 - even if you install the pre-built Dataplot executable, you need the run time libraries for the g77 compiler.

    If you do not already have g77 installed, you can download the g77 installation file. The install script described below will perform the installation.

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

    The Apple web site provides further information for installing and running X11 under Mac OS X. This page also contains a good introduction to using X11 on Mac 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. For convenience, you can also download it directly from this page.

  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. In particular, there are two primary sources for downloading and installing Tcl/Tk for Mac OS X:

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

      For convenience, you can also download it directly from this page.

      Note that this is the version I am currently running on my own Mac. The Source Forge web site contains several versions of the download. The Dataplot Tcl/Tk scripts currently only use the core Tcl/Tk (i.e., no packages).

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

      Note that although this implementation is freely downloadable, you have to download it directly from the Active States web site.

    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.

I have modified the installation a bit starting with the February 2008 version of Dataplot. The older installations will still be available for the near future.

Step 1: Binary or Source Installation As mentioned above, you can either perform a binary installation or a source installation.

I develop for the Mac OS X using a Power Mac running tiger (10.4). So if you have an Intel-based Mac or you are running 10.2 or earlier, you will probably need to do a source installation. Otherwise, you should be able to use the binary installation.

Note: If there are any users who have an Intel-based Mac and would like to contribute the binaries, please contact alan.heckert@nist.gov.

Step 2: Download the Files The next step is to download the files. You can download these files wherever it is convenient, but you should download them all to the same directory.
  1. The file dpbin.tar.gz contains:

    • The Dataplot executable for the Power Mac (installed in /usr/local/bin).

    • A script to run the Dataplot GUI (installed in /usr/local/bin).

    • Dataplot uses the GD library to generate JPEG, PNG, and GIF format files. The GD library in turn uses the PNG library, the ZLIB compression library, the JPEG library, and the Freetype library. Dataplot will install the versions of the libraries used by Datplot in the "/usr/local/lib" directory.

      The current version of the Mac OS X Dataplot executable uses version 2.0.33 of GD, version 1.2.8 of PNG, version 1.2.3 of ZLIB, and version 2.10 of Freetype.

    If you are going to perform a source build, then you do not need to download this file.

  2. The file dplib.tar.gz contains the Dataplot auxillary files. This includes the online help files, sample data files, the script and menu files for the GUIs, and other files used by Dataplot. These files are all installed in the "/usr/local/lib/dataplot" directory.

    Note that this file should be downloaded whether you performing the binary install or the source install.

  3. The file dpsrc.tar.gz contains the Dataplot source code files. This includes Fortran source files, C source files, include files, and a script file to build Dataplot for Mac OS X. These files are all installed in the "/usr/local/src/dataplot" directory.

    Note that this file does not need to be downloaded if you are performing the binary install.

  4. The file install_dataplot_files contains a script for unpacking the files.
Step 3: Unpack the Files The next step is to run the "install_dataplot_files" script. This script will unzip and then unpack the downloaded files to appropriate locations.

You should edit the file using any ASCII text editor and make the following changes (if needed):

  • If you need to install the g77 compiler, look for the lines

    # gunzip g77.tar.gz
    # tar -P -xvf g77.tar

    and delete the leading "#" to uncomment these lines.

  • If you are performing a source install, look for the lines

    gunzip dpbin.tar.gz
    tar -P -xvf dpbin.tar

    and add a "#" at the beginning of the line to make these lines comment statements.

  • If you are performing a source install, look for the lines

    # gunzip dpsrc.tar.gz
    # tar -P -xvf dpsrc.tar

    and delete the leading "#" to uncomment these lines.

Then open a terminal window, move to the directory containing the installation files, and enter the command
    sudo ./install_dataplot_files
This will unpack the files and install them in the appropriate directories. The "sudo" command gives you temporary administrator privleges (you need this since the Dataplot files will be installed in "/usr/local").
Binary Installation
Step 1: Check Path The Dataplot executables are installed in "/usr/local/bin" directory. This means that "/usr/local/bin" should be in your default path. To check this, enter (from a terminal window)
    dataplot
If Dataplot comes up, then your path is ok. Enter QUIT to exit Dataplot. On the other hand, if you get a "dataplot not found" message, you need to update your default path.

If you use the c-shell or the t-shell, then you need to add a line like the following to your .cshrc file:

    set path=(/usr/local/bin $path)

If you use the Bourne or Korn shell, then you need to add the lines like the following to your .bash_profile file:

    PATH=$PATH:/usr/local/bin export path

To activate this path, close your current terminal window and then re-open it. Now when you enter

    dataplot
it should come up correctly.
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
Test the GUI Version Before testing the Dataplot GUI, you should first check the following:
  • If the Tcl/Tk program "wish" is not installed in "/usr/local/bin", you need to modify the file "lib/dataplot/frscript/xdp". Specifically, the first line of this file needs to point to the correct location for the "wish" program on your platform.

    In most cases, the "wish" program should be installed in either "/usr/local/bin" or "/usr/bin". However, you should verify the exact location on your system.

  • Likewise, check the file "/usr/local/bin/xdataplot". A number of environment variables are set in this file. Verify that these paths are appropriate for your local platform.
If you do need to modify either of these files, you need to edit using the "sudo" command since these files are in the "/usr/local" directory. For example,
    sudo vi /usr/local/bin/xdataplot
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.

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.

The installation script above should have installed the g77 compiler (the gcc compiler should already be installed).

Although I haven't yet automated this to the degree that I ultimately hope to, it should be a relatively straightforward source build if you skip the GD library.

You Can Move the Files to a More Convenient Directory Although Dataplot will install the source files to "/usr/local/src/dataplot", you will probably find it more convenient to move the files to a directory in your own file space so you won't have to use the "sudo" command to modify files. For example, you might want to create the directory "~/src/dataplot" and then copy the files from /usr/local/src/dataplot to ~/src/dataplot.

There is no particular restriction or structure required for the source directory.

GD (and associated libraries) As mentioned above, Dataplot uses the GD library to create graphics in JPEG, PNG, and GIF format. Although this is certaintly a useful feature, it is not critical for running Dataplot.

If you are uncomfortable in building software from source, then I recommend building Dataplot without the GD library. Even if you are more experienced with this, I recommend first building Dataplot without the GD libraries. Once the basic Dataplot is working, you can go back and try to build it with the GD library enabled.

In any event, when you want to enable the GD library, you will need to install the following libraries:

  • GD
  • Freetype
  • JPEG
  • PNG
  • ZLIB
First, check to see if these libraries are already installed in either "/usr/lib" or "/usr/local/lib". The ZLIB library (look for files starting with "libz") will typically be installed. The others may or may not be.

For convenience, I have provided links to these libraries

Note that you should build the ZLIB library first, then the PNG, JPEG, and Freetype libraries, and finally the GD library.

Each of these comes with its own installation instructions.

Edit the Build Script The source directory should contain the file
    build_g77
Edit this file using an ASCII editor.
  • Near the beginning of the file should be the line that starts with "cd ". Edit this line to move to the directory where you have the source files.

  • Look for the line "set GD_FLAG = on". To disable the GD library, change the "on" to "off". If you have successfully installed the GD library, you can leave this as "on".

  • Look for the line (at the end of the file) that starts with "$FCOMP -dynamic -o dataplot_macosx main.f". The file after the "-o" specifies the name for the Dataplot executable. You can change this to whatever you like.
No other edits should be required. To initiate the build, enter the command
    ./build_g77
Once you are satisfied that you have a successful build, you can move the executable to "/usr/local/bin".
Problems with Downloading
Installation Available on CD Sometimes users do have problems downloading Dataplot from the web pages. Note that I do not maintain the NIST ftp/web servers (I do provide the content for Dataplot, but I am not a system adminstrator for these servers). Downloading problems may be caused by firewalls, ftp/browser configurations, etc.

I simply do not have the time or expertise to diagnose these types of problems. I can check to see if our ftp server is up, but not much beyond that.

If you are unable to download via the web, you can do the following:

  1. You can try using anonymous ftp directly.
    ftp  ftp.nist.gov
    user name> anonymous
    password>  your e-mail address
    >cd /pub/dataplot/mac
    >dir
                 
    At this point, the dir command will list the files needed for the Mac OS X installation. Be sure to enter a "binary" command before downloading any "exe", "tar.gz" or "tar.Z" files.

    I only recommend this if you already reasonably familiar with using anonymous ftp.

  2. Alternatively, I can send the Dataplot installation on a CD-R. This is easier for me than trying to diagnose ftp/browser/firewall problems. There is no charge, just send a request to Alan Heckert. Be sure to include your mail address (not e-mail) and the desired platform.
Installation Problems If you have problems with the installation, contact Alan Heckert for assistance.

Date created: 6/5/2001
Last updated: 2/6/2008
Please email comments on this WWW page to sedwww@cam.nist.gov.

Dataplot |  Dataplot Downloading |  PC Downloading |  Unix Downloading |  Downloading Other ]