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

Dataplot Frequently Asked Questions (FAQS)

Installation Questions
  1. How do I download and install Dataplot?
  2. The GUI version of Dataplot does not run under Windows, what do I do?
  3. The command line version of Dataplot gives me a blank screen, what do I do?
  4. How do I use my PC as a terminal for running Dataplot on another platform (e.g., Unix)?
  5. The fonts in the GUI menus are too small, what do I do?
  6. Can I redistribute Dataplot with my own applications?
Printing Questions
  1. How do I import a Dataplot graph into Word or Power Point (or some other external program)?
  2. How do print my Dataplot graphics in the Unix version of Dataplot?
  3. How do print my Dataplot graphics in the Windows version of Dataplot?
  4. How do print the current screen plot (PP) under Unix and Windows?
  5. How do I get named plot files?
  6. How do I generate portrait mode Postscript plots
Data and I/O Questions
  1. Can I read Excel files into Dataplot?
  2. What type of data files does Dataplot read?
  3. Can I read character data into Dataplot?
Graph Construction Questions
  1. How do I position the title?
  2. How do I reposition the vertical axis label?
  3. How do I set the margin spacing within a plot?
  4. How do I Generate text with upper and lower case script?
  5. How do I encircle/highlight data points on a plot?
  6. How do I have two different left/right axis labels?
  7. How do I correct an oversized default font on the screen?
Fitting and Data Analysis Questions
  1. How do I capture regression output to an external file?
  2. How do I access regression coefficient standard deviations?
Dataplot Programming Questions
  1. How do I repeat blocks of commands?
  2. Where should I have the Dataplot login file dplogf.tex?
  3. How do I integrate Dataplot with my own Fortran/C programs?
  4. Can I extract the Dataplot source code to use in my own Fortran/C programs?

Installation Questions

How Do I Download and Install Dataplot? Question: How do download and install the Dataplot software?

Instructions for downloading and installing Dataplot can be found at the download web page.

Separate pages are setup for Unix and Windows downloads.

Return to FAQ list
The GUI Version of Dataplot Does Not Run Under Windows, What Do I Do? Question: The GUI version of Dataplot does not run under Windows, what do I do?

If the GUI version of Dataplot fails to run on the PC, check the following:

  1. Check that files were unpacked correctly. That is, under the "C:\DATAPLOT" directory, you should have the Dataplot executable files "DATAPLOT.EXE" and "DPLAHEY.EXE". You should also have the directories "FRMENUS" and "FRSCRIPT". These are the GUI directories. You should also have the directories "DATA", "DEX", "MACROS", "PROGRAMS", and several others. If these files and directories are present, then the unpacking of the files is probably correct.

  2. Did you install the Tcl/Tk software? You can install this software by typing "C:\DATAPLOT\TCL830.EXE" in a DOS Prompt window or by double clicking on this file from the Windows Explorer. This is a self-installing file, so just follow the instructions on the screen to complete the installation. You may need to reboot to complete the installation.

  3. For Windows 95/98/ME platforms, did you set the amount of "environment memory" for the "DP.BAT" file. This is by far the most common problem if the GUI does not run correctly. The exact error message varies depending on the specific platform and vendor, but typical error messages are along the lines of "can't find files" or "no space for environment variables". The post downloading instructions on the download web page give specific instructions for setting the initial environment memory.

  4. Did you install on a drive other than "C:\"? If so, be sure to check the drive designations in the "DP.BAT" file. In particular, check the lines "SET DPDIR=" and "SET TCLDIR=". Be sure that the drives are set appropriately for your local installation. In addition, you need to edit either the file XDPCWNNT or XDPCWN95 (see the DP.BAT file to see which one on your platform) in the FRSCRIPT directory. Check the lines starting with "dataplot windows" and "library windows" and set the drive appropriately for your system.

  5. Did you change the directory structure for the Dataplot installation? That is, did you install in "C:\PROGRAM FILES\DATAPLOT" instead of "C:\DATAPLOT". Note that is ok to do this. However, you need to edit the file "DP.BAT" carefully to ensure that all path names are correct. If you change the drive (i.e., D: instead of C:), but leave the basic structure intact, you only need to change the drive letter in DP.BAT. However, if you also change the directory structure, more substantial edits are required in "DP.BAT". The required changes should be fairly clear, but be careful that all path names are correct. Also, similar to the above item, the files XDPCWNNT and XDPCWN95 also need to be edited in a similar manner.
If you still unable to resolve the problem, then contact Alan Heckert for additional assistance.
Return to FAQ list
The Command Line Version of Dataplot Gives Me a Blank Screen, What Do I Do? Question: The command line version of Dataplot on the PC gives me a blank screen, what do I do?

The PC can run in two different color modes. The first, called true or direct color, specifies a red, blue, and green component (i.e., RGB), each with an integer value between 0 and 255. Alternatively, a specific number of colors can be supported (e.g., 255). The non-RGB mode is more common on older computers with display cards with more limited memory. In this mode, there is typically a trade-off between the number of colors and the video resolution (i.e., as the resolution goes up, the number of available colors goes down).

The Dataplot command line version on the PC is created with the Compaq Visual compiler (previously the Microsoft Fortran compiler) using the QuickWin graphics library. This library does not provide an automatic method for determining which color mode is in effect.

The blank screen is caused by Dataplot assuming the wrong color mode. By default, Dataplot uses the non-RGB color mode. If you get a blank screen (this is actually a black foreground on a black foreground), then add the option "-true" option when you invoke DATAPLOT.EXE. For example,

    DATAPLOT.EXE -true -large
If you installed Dataplot in a directory other than "C:\", DATAPLOT.EXE is typically invoked from the "DPCOMM.BAT" file.

The color mode can be changed by the user under the Control Panel. If the color mode is changed on your machine, you may need to modify the "-true" switch (i.e., either add it or remove it).

The Fonts in the GUI Menus Are Too Small, What Do I Do? Question: The fonts in the GUI menus are too small, what do I do?

There is a configuration file for the Tcl/Tk scripts. You can change the size of the requested fonts in this configuration file. Note that you can also change the default editor and the default web browser in this file as well. This configuration file is an ASCII file that can be edited with your favorite text editor. The comments in the configuration file give the specific instructions for modifying the font sizes.

For Unix platforms, the configuration file is located in the "frscript" subdirectory in the Dataplot auxillary directory (/usr/local/lib/dataplot by default). The name of the file is "xdpConfig". If you copy this file to your home directory, the version in the home directory overrides the version in "frscript". You can modify the "frscript" version to set site wide defaults and you can, optionally, have the version in your home directory to set personal defaults. Font sizes will typically be a site wide default. On the other hand, the choice of default browser and editor is often a personal default.

For Windows platforms, the default location for the configuration file is "C:\DATAPLOT\FRSCRIPT\XDPCONFIG". Note that the "DP.BAT" script (which is the file that initiates the GUI) is setup to copy either XDPCWNNT (for NT 4 and Windows 2000) or XDPCWN95 (for Windows 95, 98, ME) to XDPCONFIG. This is due to the fact that the different versions of Windows use slightly different paths for the browsers, Notepad, and Wordpad. That is, you should edit either XDPCWN95 or XDPCWNNT rather than XDPCONFIG since XDPCONFIG gets overwritten whenever you run DP.BAT.

Can I Redistribute Dataplot with my Own Applications? Question: Can I redistribute Dataplot with my own applications?

You are free to redistribute Dataplot as part of your own applications software. If you want to include the Dataplot CD or any printed documentation, we request that you provide these rather than sending your customers to us (i.e., we will give you a copy, then you are free to make as many copies as you need for your own purposes).

Return to FAQ list
How Do I Use My PC as a Terminal for Running Dataplot on Another Platform (e.g., Unix)? Question: I am using my IBM PC compatible to run Dataplot on a remote workstation. I do not particulary want to install and run Dataplot locally on my PC, but I would still like to generate high quality graphics on my screen.

When used as a terminal to a remote computer, the graphics capability is determined by the communications software. The type of graphics protocol supported varies widely depending on the specific communications software you have.

The most common case is that Dataplot is running on a remote Unix workstation. In this case, the recommended solution is to obtain and install an X11 software package on your PC. This allows your PC to operate as an X11 terminal. If you have an ethernet connection, this is probably the most satisfactory approach.

A number of commercial implemenatations of X11 software are available for the PC. X11 is a protocol designed to provide device independent graphics and windowing in a network environment. It is the standard protocol for most Unix workstations.

As a technical note, the X11 library comes in three layers:

  1. xlib provides the graphics and windowing primitives.
  2. xt provides the primitives for writing GUI's.
  3. the toolkit layer (there are a number of different toolkit libraries) provides the routines for defining a specific "look and feel" for a GUI.
Dataplot currently only makes use of the xlib library. This means that Dataplot should run on just about all X11 packages (some of the cheaper or free implementations may only support the xlib and xt layers).

For non-X11 mainframes (e.g., Vax/VMS) or for access over a telephone line, the communications software you use may provide for some type of graphics emulation. Some communications software may not support any graphics emulation capability. Dataplot supports the following graphics protocols that may be useful for this purpose:

  1. TEKTRONIX 4014 (also supports color models such as 4105 and 4115)
  2. REGIS (protocol used by DEC VT-240 and VT-340 terminals)
  3. HP 2622 (a Hewlet-Packard terminal)
For example, Kermit and the NCSA TCP/IP package both support Tektronix 4014 emulation. Kermit is useful if you are communicating over a phone line. If you have an ethernet card, check in the index of the accompanying documentation for the above terms (i.e., TEKTRONIX, REGIS, HP 2622). Be aware that the software provided by some TCP/IP implementations does not support ANY graphics protocol.

If your communications protocol does not support graphics emulation, you may want to investigate the possibility of obtaining a communications program that does support one of the above graphics protocols. You may want to check with your local system adminstrators to see if they can provide guidance for your site.

Return to FAQ list

Printing Questions

How Do I Import a Dataplot Graph Into Word or Power Point (or Some Other External Program)? Question: How do I import a Dataplot graphic into Word or Power Point or some other external program?

It is common to want to import a Dataplot graphic into a report written in Word, WordPerferct, Latex, or some other word processor or page publishing system. You may also want to include Dataplot graphics into a Power Point presentation or import the graph into a graphics editing program such as Adobe Illustrator.

The issues involved in this are given on the Graphics Devices web page.

Return to FAQ list
How Do I Print My Dataplot Graphics in the Unix Version of Dataplot? Question: How do I print my Dataplot graphics in the Unix version of Dataplot?

Printing the graphics files dppl1f.dat or dppl2f.dat is performed in the standard way for your operating system. For example, on Unix you would enter the Unix command

    lpr -P<printer id> dppl1f.dat
If you are not sure how to print files on your operating system, check with your local system administrator.

Under Unix, Dataplot can generate either Postscript (DEVICE 2 POSTSCRIPT) or HPGL (DEVICE 2 HPGL LASER). If you have a non-supported printer (e.g., a DeskJet or InkJet type printer), then investigate Ghostview/Ghostscript. First, check the Ghostview/Ghostscript documentation to see if your printer is supported. If so, then check to see if Ghostview/Ghostscript is already installed on your system. If not, you need to download and install it (hopefully, your local system administrator will be willing to help).

Note that in Unix, there is not a common "graphics device" interface for printers. The protocol for a given printers has to be explicitly supported. For this reason, Postscript is the preferred protocol for printers in the Unix world and the list of supported printers in Ghostview may be smaller in the Unix implementation than the Windows implementation. This is more likely to be an issue for PC based Unix/Linux platforms than for workstation based platforms.

Return to FAQ list
How Do I Print Dataplot Graphics in the Windows Version of Dataplot? Question: How do I print Dataplot graphics in the Windows version of Dataplot?

This issue is discussed in detail on the Graphics Devices web page.

Return to FAQ list
How Do I Print the Current Screen Plot (PP) Under Unix and Windows? Question: How do I print the current screen plot (PP) under Unix and Windows?

In UNIX, the PP command to print the last plot on the screen works, but sends the plot off to the wrong printer; how do I get PP to send the plot to the correct printer?

In UNIX, Dataplot's PP command sends the plot off to your current default printer. To determine the current printer, enter from UNIX:

    echo $PRINTER
To change the printer default (e.g., to lw9), use the UNIX setenv command (either manually or via the .cshrc file):
    setenv PRINTER lw9
Alternatively, you can set the default printer in the Dataplot session with the Dataplot command:
    set printer lw9

For Windows, there are two basic cases that we will consider separately:

  1. Printers that support Postscript or HP-GL emulation (e.g., most HP LaserJet printers)
  2. Generic Windows printers (this would include deskjet, paintjet, etc.)
Case 1: Postscript and HP-GL emulation

For the first case, Dataplot supports both Postscript and HP-GL emulation directly. By default, the Dataplot PP command issues the following command:

By default, the plot in DPPL2F.DAT will be in Postscript format. If your printer supports HP-GL emulation, but not Postscript, then we recommend placing the following commands in the C:\DATAPLOT\DPLOGF.TEX file (the Dataplot start-up file):
The second issue to consider is the case where you want to print the Dataplot graph on a network printer rather than the local printer. In this case, you need to enter the following Dataplot command:
    SET PRINTER <printer-id>
where <printer-id> is the id for your network printer. For example, on my site I enter
Note that this printer-id is site specific. Contact your local systems adminstrators if you need assistance in identifying the correct name to use for the printer. These names are dependent on how your local site has defined them, so I cannot help you with this part. If you need to define the printer, I recommend placing the SET PRINTER command in the start-up file C:\DATAPLOT\DPLOGF.TEX.

Case 2: Generic Windows Printer

Alternatively, you can use a generic Windows printer. Dataplot does not support this directly. Instead, it uses the freely downloadable Ghostview/Ghostscript software (Ghostscript is a Postscript translator and Ghostview is a Windows program that uses Ghostscript to display or print Postscript files). Ghostview provides the command GSPRINT that will print a Postscript file on a generic Windows printer.

In order to use a generic Windows printer, you need to do the following:

  • If Ghostview/Ghostscript are not already installed on your system, then download and install them (the installation is straightforward, just be sure to install Ghostscript first). After the installation is complete, there should be a file called GSPRINT.EXE in the Ghostview directory (C:\GHOSTGUM\GHOSTVIEW by default).

  • Add the following command to your C:\DATAPLOT\DPLOGF.TEX file (the Dataplot start-up file):


    When this command is given, the Dataplot PP command issues the following DOS command to print the graph:


    This will send the Dataplot plot in DPPL2F.DAT to the generic printer.

    Note that you should leave the DEVICE 3 output as Postscript (the default).

  • If you do not want to use the default printer, then you can use the SET PRINTER command (described above) to identify the appropriate printer. Note that the GSPRINT command is rather picky about how the printer name is given (I recommend running GSPRINT independent of Dataplot to determine the correct name). Alternatively, you can use Windows Printer menu to redefine the default printer.

  • If you did not install Ghostview in the default location (C:\GHOSTGUM\GHOSTVIEW), then add the following command to DPLOGF.TEX:

      SET GHOSTVIEW PATH <path-name>

    where <path-name> identifies the path where you installed Ghostview.

Note: The SET GHOSTSCRIPT PRINTER and GHOSTVIEW PATH commands were added for the 11/2002 version of Dataplot. If you have an earlier version of Dataplot, then you will need to download the latest version in order to use this capability.
Return to FAQ list
How Do I Get a Named Print File Question: How do I get a named print file?

Dataplot maintains three graphics devices. These can all be used simultaneously and independently. The graphics devices are:

    DEVICE 1 is your terminal screen.
    DEVICE 2 output is generated to the file dppl1f.dat in your current directory
    DEVICE 3 output is generated to the file dppl2f.dat in your current directory
DEVICE 3 is special. It maintains a copy of the current plot in Postscript format. DEVICE 3 is automatically opened and closed by Dataplot without any explicit action by the user. By contrast, DEVICE 2 must be explicitly opened and closed by the user and will contain ALL plots generated while the device is open.

There are 2 basic approaches to creating your own named plot files.

  1. Method 1:

    In the first method, you can explictly name the file. For example,

      ... generate plot ...
      ... generate second plot ...

    This sequence can be repeated as many times as needed. Note that this captures the DEVICE 2 output (which is normally written to dppl1f.dat). The command SET IPL1NA defines the name of the file. This command MUST be entered before the DEVICE 2 POSTSCRIPT command since the file is opened at that point.

    You are not restricted to Postscript output. The DEVICE 2 command can specify any valid Dataplot output device. The restriction on the file name is that it be 80 characters or less.

    Although this approach can also be used with DEVICE 3, it is a little trickier due to the fact that Dataplot opens and closes the output file automatically. For DEVICE 3, method 2 is recommended.

  2. Method 2:

    This method takes advantage of the fact that a postscript version of the plot currently on your screen also resides in the file dppl2f.dat. To copy a pre-existing plot out to file XYZ., one needs only to

      SYSTEM cp dppl2f.dat XYZ. (for Unix)

    The advantage of this approach is that it can be done after the fact. The basic idea can be applied to DEVICE 2 output as well (copy the dppl1f.dat file instead of the dppl2f.dat file).

Return to FAQ list
How Do I Generate Portrait Mode Postscript Plots? Question: How do I generate a portrait-mode postscript plot? In particular, How do I generate a plot of Y = x**2 with titles and labels and have it in portrait mode as opposed to the default landscape mode?

The following code will generate the portrait-mode Postscript plot:

    PLOT X**2 FOR X = 1 1 10
In this example, the postscript output for DEVICE 2 will by default go to the file DPPL1F.DAT. Do a system print of the file to any postscript printer. For example, on Unix you would enter
    lpr dppl1f.dat
If you do not prefer the positioning of the plot on the vertical page, then adjustments may be made via the FRAME COORDINATES command, as in
    FRAME COORDINATES 10 20 90 90
    PLOT X**2 FOR X = 1 1 10
This code will make the plot a little larger on the page by changing the lower left corner of the plot frame lines from the default of 15 20 (15% over and 20% up) to 10 20 (10% over and 20% up), and the upper right corner of the plot frame lines from the default of 85 90 (85% over and 90% up) to 90 90 (90% over and 90% up).

If you are generating multiple plots per page and you wish to have portrait mode output, then to additionally adjust the aspect ratio, you may also use the MULTIPLOT COORDINATES command which will adjust the size and position of the entire set of multiplots from its default of 15 20 85 90. An example of the use of that command is

Adjustments on the vertical axis label (to prevent possible overwriting on tic lables) may be done via the Y1LABEL OFFSET command (default is 8), as in
which would move the left vertical axis 15% to the left of the left vertical frame line. If you are using filled symmetric plot characters (for examples, circles) and you want to maintain the symmetry after conversion to portrait mode, then you may use the CHARACTER HW command (default height = 2% and default width = 1%) of total screen height and width, respectively, as in
which would set all within-plot characters to a height of 1% and to a width of 1.4% (such a sizing yields symmetric circles as opposed to ellipses) for 2 by 2 multiplots.

In summary, therefore, for a 2 by 2 multiplot, the following code yields nice output for portrait mode:

    FRAME COORDINATES 10 20 90 85
    CHARACTER HW 1 1.4
    PLOT X FOR X = 1 1 10
    PLOT X**2 FOR X = 1 1 10
    PLOT X**3 FOR X = 1 1 10
    PLOT X**4 FOR X = 1 1 10
Return to FAQ list

Data and I/O Questions

Can I Read Excel Files into Dataplot? Question: Can I read Excel (or other spreadsheet or database programs) files into Dataplot?

The short answer is no.

Currently, if you have your data in an Excel spreadsheet, you must first save it as an ASCII file. Use the "File/Save As" menu. There are several ASCII options. For more information on reading the various types of ASCII files that Excel can generate, enter


This help entry summarizes the information on reading various types of ASCII files and specifically discusses reading ASCII files generated by Excel.

We are also investigating support for ODBC databases on the Windows platforms. This would include the ability to read Excel files directly. Both of the Fortran compilers we now use for the Windows platform support the same third party software to provide this capability. We hope to incorporate this into a future (hopefully, near future) version of Dataplot.

What Types of Data Files Does Dataplot Read? Question: What types of data files does Dataplot read?

Currently, Dataplot reads ASCII files. These files can be created either using your favorite text editor or as the output from an commercial software program or as output from one of your own programs.

The standard format of the ASCII file is a rectangular block of data. That is, the columns represent variables and the rows represent observations (Dataplot assumes that all variables in a given file have the same number of observations). If your data files is structured so that rows represent variables and columns represent observations, then you can use the SERIAL READ command to read the data.

Dataplot supports a number of commands for skipping header lines, restricting which rows and columns are read, and specifying a fixed format for the data. These are documented in Chapter 9 of Volume I of the Reference Manual.

Dataplot does support unformatted Fortran files. This is typically reserved for very large data files to speed up the reading and writing of data files. Dataplto does not currently support reading generic binary files (e.g., binary data written from a C program). For details on using Fortran unformatted files, enter the Dataplot command HELP READ FORMAT (SET).

For a discussion of various issues regarding reading ASCII files, enter the command

Can I Read Character Data into Dataplot? Question: Can I read character data into Dataplot?

For the most part, no. Dataplot expects data entered using the READ command to be numeric data only. If your data file contains alphabetic data, then you must use either the COLUMN LIMITS or the READ FORMAT command to skip over the alphabetic data.

There are two ways to support alphabetic data in Dataplot.

  1. You can read row labels using the ROW LABELS command. Row labels can be used as the CHARACTER setting (to label individual plot points) for subsequent plots. We may extend the usage of ROW LABELS in future releases of Dataplot.

  2. Dataplot does not support arrays of strings (i.e., character variables). However, you can emulate this capability to a degree using the LET STRING and the substitution character ("^"). For example, if columns 11 through 20 of the data file TEST.DAT contain an alphabetic variable, you could do something like the following:

      LET NROWS = 30
      COLUMN LIMITS 11 20
      LOOP FOR K = 1 1 NROWS
      LET NSKIP = K - 1

    Then the syntax ^S^K would extract the value of the kth string in subsequent Dataplot commands.

NOTE: Some additional commands allowing limited support for character data were implemented in the 2004 version of Dataplot. Check the NEWS entry for details.

Return to FAQ list

Graph Construction Questions

How Do I Position the Title? Question: How do I go about moving the title on my plot down closer to the upper frame line?

In Dataplot

    the bottom of your screen is at 0
    the top of your screen is at 100
    the top frame line of your plot is at 90
    the title line is at 97 (= 7 units above the top frame line)
To change the default TITLE position, use the TITLE OFFSET (= the TITLE DISPLACEMENT) command, as in
which would offset the TITLE on all succeeding plots to be at 93 (= 3 units above the top frame line).

To make this permanent, put the appropriate TITLE OFFSET command in your DPLOGF.TEX so that it will be automatically executed upon entry into Dataplot.

Return to FAQ list
How Do I Reposition the Vertical Axis Label? Question: The default positioning of the left vertical axis label (as obtained by the Y1LABEL command) is such that the label happens to be overwriting the tic mark numbers. How do I move the label to the left so as to avoid this overwriting?

In Dataplot

    the left edge of your screen is at 0
    the right edge of your screen is at 100
    the left vertical frame line is at 15
    the left vertical axis label is at 7 (8 units to the left of the axis line)
To change the default Y1LABEL position, use the Y1LABEL OFFSET (= the Y1LABEL DISPLACEMENT) command, as in
which would offset the Y1LABEL on all succeeding plots 10 units to the left of the left frame line.

To make this permanent, put the appropriate Y1LABEL OFFSET command in your DPLOGF.TEX so that it will be automatically executed upon entry into Dataplot.

Return to FAQ list
How Do I Set the Margin Spacing Within a Plot? Question: Some of my plots have data points which end up on the frame lines and so are hard to see and easy to miss. How do I build in a buffer zone within a plot so that the plot points are visibly off the frame lines?

This problem is caused (by default) because the tic mark minimum and maximum are at the frame corners. The easiest way to solve the problem is to offset the minimum and maximum away from the corners. This is done via the TIC OFFSET command. The TIC OFFSET may be done either in data units or in screen (0 to 100) units. The most common offsetting is done in screen units. Thus, for example, to build in a 5% buffer zone inside all 4 frame lines of a plot, enter

    TIC OFFSET 5 5
To make this permanent, put the above 2 commands into your DPLOGF.TEX so that it will be automatically executed upon entry into Dataplot.
Return to FAQ list
How Do I Generate Text with Upper and Lower Case Script? Question: In a Dataplot macro, I had
    TITLE Calibration Analysis
(a mixture of upper and lower case) but the output on a plot was
(all caps). Why did this happen and how can I fix it? I have similar questions regarding automatic capitalization for plot labels, plot tic labels, plot legends, general text strings, etc.

The case of output strings is controlled by various forms of the CASE command. The default is UPPER which means the default output case for titles, labels, tic labels, legends, text, etc. (regardless of the case of the input string as specified by the TITLE, LABEL, TIC LABEL, LEGEND, and TEXT commands) is UPPER (= upper case). Three cases are allowed:

    UPPER (upper case--the default)
    LOWER (lower case)
    ASIS ("as is", whatever mixture you have in the string)
In particular, if you want all succeeding titles to be "as is", then enter (somewhere before the first plot command, and usually in the vicinity of the first TITLE command) the following command:
Similarly, one would have
    LABEL CASE ASIS to specify that all labels are "as is"
    TIC LABEL CASE ASIS to specify that all tic labels are "as is"
    LEGEND CASE ASIS to specify all legends as "as is"
    CASE ASIS to specify all TEXT command string as "as is"
Since it is quite common to have all titles, labels, tic labels, legends, and text strings "as is", then it is recommended to have the following five commands stored in your Dataplot login file (DPLOGF.TEX) so that they will be automatically executed upon entry into Dataplot and thus the analyst need not worry about it further:
Return to FAQ list
How Do I Encircle/Highlight Data Points On a Plot? Question: I have a plot of Y versus X. I would like to draw the viewer's attention to a particular data point on the plot by drawing a circle around that point (only). How do I do that? In particular, suppose I have a plot of Y = X**2 for X = 1 (at increments of 1) up to 10. Suppose I want to draw a circle around the data point at X = 8 (that would be Y = 64). How do I do that?

The easiest way to do that is to make use of the Dataplot multitrace capability (via consecutive PLOT statements connected by AND) and

  1. plot the raw data with usual characters and usual character sizes

  2. plot the highlighted data with circles of a larger size.
The following code will work for the problem at hand:
    TITLE Encircle/Highlight a Plot Point
    LET X = SEQUENCE 1 1 10
    LET Y = X**2
    CHARACTER HW 2 1 5 4
    PLOT Y X SUBSET X 7.5 TO 8.5
This results in the following plot.

Sample plot showing highlighting of a point

Return to FAQ list
How Do I Have Two Different Left/
Right Axis Labels?
Question: I have a function
    y = 220 - 200*exp(-x)
relating farenheit temperature (y) to time (x) for the time range x: 0 to 10. The temperature y is in farehnheit and will range from 20 degrees F to 220 degrees F. I would like to produce a single-trace plot of temperature (vertically) versus time (horizontally). Rather than generate the single left-axis-only plot that is Dataplot's default, I would like to generate a dual-axis plot consisting of
  1. neat farehnheit units from 20 to 220 on the left axis, and

  2. neat Celsius units from 0 to 100 on the right axis (properly positioned relative to the left axis and the trace).
How is this done most easily?

Inasmuch as the default Dataplot settings for tic labels are such that

  1. they float with the data;

  2. they are neat;
  3. only the left axis tics and tic labels are on (not the right);
  4. if on, the right axis tic labels would be identical to the left;
then all of these defaults must be overridden in order to achieve the desired plot. The following code will work:
    Y2TICS ON (turn the right tics on)
    Y2TIC LABELS ON (turn the right tic labels on)
    LET FMIN = 20 (set the left axis minimum at 20)
    LET FMAX = 220 (set the left axis maximum at 220)
    LET CMIN = 0 (set the right axis minimum at 0)
    LET CMAX = 100 (set the right axis maximum at 100)
    Y1LIMITS FMIN FMAX (set the left axis limits at 20 and 220)
    Y2LIMITS CMIN CMAX (set the right axis limits at 0 and 100)
    LET CMIN2 = (5/9)*(FMIN-32) (calculate what 20 F is in Celsius units)
    LET CMAX2 = (5/9)*(FMAX-32) (calculate what 220 F is in Celsius units)
    LET DELMIN = CMIN-CMIN2 (compute a lower right tic offset)
    LET DELMAX = CMAX2-CMAX (compute an upper right tic offset)
    TIC OFFSET UNITS DATA (specify that the tic offset units will be in "data units")
    TIC OFFSET 0 0 (set all tic offsets to 0 for lower tic and 0 for upper tic)
    Y2TIC OFFSET DELMIN DELMAX (set tic offsets for right axis)
    LABEL CASE ASIS (set case for axes labels to "as is")
    Y1LABEL Temperature (F) (set the left axis label)
    Y2LABEL Temperature (C) (set the right axis label)
    X2LABEL Time (set the bottom axis label)
    TITLE CASE ASIS (set case for title to "as is")
    TITLE Generate a Dual-Axis Plot (set the plot title)
    LET FUNCTION F = FMAX-(FMAX-FMIN)*EXP(-X) (define the function to be plotted)
    PLOT F FOR X = 0 .1 10 (plot the function)
This results in the following plot.

Sample plot showing dual axes

Return to FAQ list
How Do I Correct an Oversized Default Font on the Screen? Question: In generating Dataplot graphics, I commonly use the default font for graphics appearing on the screen (= device 1), and postscript renditions of the same font for paper output (= device 2). I notice that when I do multiplotting (multiple plots on the same page) even though I get nice postscript paper output plots with publication-quality helvetica font, the multiple plots on the screen are of considerably poorer quality. It seems that although the font on paper output is scaled continuously and can get arbitrarily small (while still maintaining high resolution), the font on the screen appears limited as to how small it can get and thus moderate-sized characters appear when much smaller characters are needed--thus resulting in overwriting. How can I correct this?

The questioner's observation is correct: screen graphics for the default font is limited in size, whereas device 2 postscript paper output font is continuous. For 1-plot-per-page graphics, there is no problem; however, for multiplotting, there is a problem in how text appears on plots on the screen.

The explanation for this requires an understanding of the distinction between hardware and software characters. When Dataplot draws text, it does so in one of the following two ways:

  1. Dataplot can use the character generator on the given graphics device. This is referred to as using "hardware characters". The primary advantage of using hardware characters include

    • Hardware characters are typically quite fast to generate.

    • Some graphics devices support high quality typeset quality fonts. It is desirable to use these fonts when they are available.

    The disadvantages include

    • You cannot draw special characters (e.g., Greek characters, mathematical symbols) using hardware characters.

    • The primary disadvantage is that hardware characters are device dependent and graphics devices vary considerably in the capabilities of their hardware characters.
    • Hardware characters on a given device may lack flexibility. That is, they may not support rotation and they may support a limited number of sizes.

    For example, Postscript offers fully scalable typeset quality fonts. So for Postscript output, we prefer to use hardware characters whenever possible. On the other hand, X11 fonts are a fixed size. The only way to change the size of hardware characters on the X11 device is to change the hardware font (you can do this in Dataplot with the command SET X11 FONT). However, all text elements in a plot are drawn using the same hardware font.

  2. Dataplot can also draw text using a series of moves and draws. This is referred to as using "software characters". Currently, Dataplot supports seven Hershey fonts for drawing software characters. The advantages of software characters include

    • The appearance of text characters is consistent across graphics devices.

    • Special characters (e.g., Greek characters, mathematical symbols) can be drawn with software characters.
    • Software drawn text can be quite flexible. For example, text can be rotated to an arbitrary angle and text can be scaled to an arbitrary size.

    The disadvantages of software characters include

    • They take longer to generate than hardware characters.

    • Dataplot does not currently support any typeset quality fonts. The COMPLEX font comes closest, but it is still not typeset quality. This means the appearance of text using a software font will not be as nice as the text generated by devices that do support typeset quality fonts (e.g., Postscript).

The problem with the oversized screen fonts is typically caused because the screen device is unable to scale hardware characters to the desired size.

There are two solutions for this:

Solution 1:

The first solution is to globally (across all devices) change the font from the default (= tektronix = hardware generated text) font to one of the seven continuously-scaled fonts available in Dataplot:

    simplex, duplex, triplex, triplex italic, complex, and complex script
For example, you can enter FONT SIMPLEX anywhere before the first plot and this will yield graphs on the screen with properly-scaled characters. The good news is that this will yield plots on the screen with properly-scaled characters; the neutral news is that such plots take a bit longer to generate; the bad news is that if device 2 is turned on to postscript (for example, by DEVICE 2 POSTSCRIPT ), the resulting postscript paper output will in fact be postscript, but will be a postscript rendition of a simplex font plot. This is quite good but is not as good as a postscript rendition of a default font plot (which makes use of the built-in laser printer fonts).

This solution will yield good screen graphics and adequate postscript paper output.

Solution 2:

Prior to July 1996, solution 1 was the only solution. As of July, 1996, Alan Heckert of NIST has provided a more acceptable second solution. Solution 2 is to change the font from default to scalable for device 1 only (the screen), while maintaining a high-quality postscript rendition of the default font for device 2 (paper output). In practice, to maintain acceptably fast screen graphics, use the fastest scalable font (simplex).

This solution will yield both good (simplex font) screen graphics, and excellent postscript (default font) paper output graphics. Some trial and error may be required due to the fact that the Postscript hardware fonts come out somewhat smaller than the Dataplot Hershey fonts.

Return to FAQ list

Fitting and Data Analysis Questions

How Do I Capture Regression Output to an External File? Question: How do I capture the text output from a regression out to a file so that I can use it as part of a report?

The text output from the FIT command (or the text output from any Dataplot command for that matter) may be captured by use of the CAPTURE command. Thus if one wants to capture the text output from a quadratic fit out to the file XYZ., for example, then one would enter

    QUADRATIC FIT Y X (to see the fit output on the screen)
    CAPTURE XYZ. (to initiate the capture of text out to file XYZ.)
    QUADRATIC FIT Y X (to regenerate the fit output; nothing will go to the screen)
    END OF CAPTURE (to terminate the capture of text out to file XYZ.)
    LIST XYZ. (to view on screen the contents of file XYZ.)
Return to FAQ list
How Do I Access Regression Coefficient Standard Deviations? Question: When I do a regression, the coefficients become Dataplot parameters (scalars) but the standard deviation of the coefficients, though seen on the screen, are not saved as Dataplot parameters. I would like to have the coefficient standard deviations as parameters for printing and/or for annotation on plots. How do I get these coefficient standard deviations?

Whenever a FIT command is executed, the coefficients and their standard deviations are copied out to file dpst1f.dat in your current directory. Thus to get the standard deviations, simply read them in (via the READ command), as in:

    QUADRATIC FIT Y X (carry out the quadratic fit)
    SKIP 0 (since dppl1f.dat has no header lines)
    READ DPST1F.DAT COEF SDCOEF (read in coefficients & sd(coefficients) into vectors COEF and SDCOEF)
    LET SDA0 = SDCOEF(1) (copy the first element of SDCOEF into the parameter SDA0)
    LET SDA1 = SDCOEF(2) (copy the second element of SDCOEF into the parameter SDA1)
    LET SDA2 = SDCOEF(3) (copy the third element of SDCOEF into the parameter SDA2)
    WRITE A0 A1 A2 SDA1 SDA1 SDA2 (write (to screen) the coefficients & their sd's)
    X2LABEL AO = ^A0 SDA0 = ^SDA0 (define contents of X2LABEL for future plots)
    PLOT RES X (generate a residual plot--including X2LABEL)
Return to FAQ list

Dataplot Programming Questions

How Do I Repeat Blocks of Commands? Question: How do I go about re-executing a previous command or a previous set of commands?

If you want to repeat a single command, then you may use the REPEAT (or R for short) command. To re-execute the last command, enter any of the following:

    REPEAT 1
    R 1
If you want to repeat a command that occurred a few commands back but you are not sure how far back, then precede the R command with a LIST (or L) command with no arguments:
This will list out the previous 20 commands or so. If the desired command was, say, 7 commands back, then you would follow the LIST command by either of the following:
    REPEAT 7 R 7
If you need to re-execute a group of commands, then this is done via a sequence of the following commands:
    LIST (or L) (to list and see the previous commands with line numbers)
    SAVE (or S) (to save, in whatever order desired, previous commands)
    / (to rexecute the saved commands)
For example,
    MULTIPLOT 2 2 (to specify that the next 2 x 2 = 4 plots appear on a the same page in a 2-by-2 grid)
    PLOT Y1 X1 (to plot Y1 versus X1 in upper left)
    PLOT Y2 X2 (to plot Y2 versus X2 in upper right)
    PLOT Y3 X3 (to plot Y3 versus X3 in lower left)
    PLOT Y4 X4 (to plot Y4 versus X4 in lower right)
    LIST (to list and see previous commands--with line numbers)
    SAVE 5 4 3 2 1 (to save commands 5, 4, 3, 2, and 1--in that order)
    / (to re-generate the 2 by 2 multiplot)
    CHARACTERS X (to set plot characters to X)
    / (to again re-generate the 2 by 2 multiplot)
Return to FAQ list
Where Should I Have the Dataplot Login File dplogf.tex? Question: I realize that Dataplot has a file named DPLOGF.TEX (dplogf.tex on Unix) that will automatically be executed upon entry into Dataplot. I also know that I can usefully employ DPLOGF.TEX by storing commands in this ASCII file that will override system defaults and put in place analyst preferences. How can I create this file and what directory should it go in?

The ASCII file DPLOGF.TEX may be created by any convenient editor. Dataplot first looks for this file in the current directory. If found, the search is over and the commands are executed. If not found, the search continues.

PC WINDOWS: Dataplot will look secondarily for DPLOGF.TEX in the Dataplot directory. By default, this directory is "C:\DATAPLOT". If you installed Dataplot in a different directory, you need to symbolically define the Dataplot directory by defining the variable DATAPLO$: in your AUTOEXEC.BAT file. If you installed Dataplot in the "D:\DATAPLOT" directory, then enter the command

before executing Dataplot.

Dataplot is typically executed with a shortcut to a batch file. For the command line version, the batch file is "DPCOMM.BAT" and for the GUI version the batch file is "DP.BAT". Both of these files contain a "SET DATAPLO$". If you did not use the default installation directory, then this line needs to be edited to reflect the correct location. For the command line version, if no SET DATAPLO$ variable is defined, Dataplot will search the "C:\DATAPLOT" directory for DPLOGF.TEX.

UNIX: Pre-July 1996, no central directory existed for the dplogf.tex file and so the analyst had no choice but to have the same dplogf.tex in every directory where Dataplot might be run (a waste). Post-July 1996, Dataplot looks secondarily for dplogf.tex in the directory specified symbolically as $HOME in your .cshrc file. Thus in my .cshrc, I have a line:

    setenv $HOME /usr/local/fs3b/filliben
which specified my home (root) directory. If no such line exists in the .cshrc file, then the search is terminated and no Dataplot login file gets executed.

If no DPLOGF.TEX is found, you will typically see an error message printed on the terminal indicating that Dataplot was unable to open the DPLOGF.TEX file. However, you can still continue with your Dataplot session. The only issue is that you need to be aware that no login file was run.

How Do I Integrate Dataplot With My Own Fortran or C Programs? Question: How do I integrate Dataplot with my own Fortran/C programs?

We consider integration in two basic senses.

  1. You have a Fortran program and you would like to perform some Dataplot analysis for the output of that program. Often, this just means you would like to use Dataplot to graph the data. In other cases, you would acutally like to perform some numeric analysis as well.
  2. On the other hand, you might want to have Dataplot call your Fortran/C program to perform some analysis that is not available in Dataplot.
We will discuss these separately.

First, we discuss invoking Dataplot from within a Fortran program (the basic idea is similar for a C program). The basic steps are as follows:

  • Write a Dataplot macro to perform the desired analysis.

  • When you get to the part of the code where you want to invoke Dataplot, do the following:

    1. Write out the data that Dataplot needs to one or more ASCII files. The Dataplot macro that you write will read these files.

    2. Most Fortran compilers give you a "SYSTEM" function. This is not standard Fortran, so the exact syntax will vary depending on the specific compiler that you are using. A typical call would be something like

        CALL SYSTEM("dataplot < sample.dp > sample.out")

    3. You can use the SYSTEM call to print out any graphics files or text output files that were created by Dataplot.

  • If Dataplot creates any data that you want to incorporate back into your Fortran program, have your Dataplot macro write this to an ASCII file using the WRITE command. Then have your Fortran code read these files.
Second, we discuss invoking your own program from within Dataplot. The basic steps are as follows:
  • Have Dataplot write any data that your Fortran program needs to appropriate ASCII files (i.e., the WRITE command).

  • Create an executable file using your local compiler. Your executable should be setup to read the ASCII files created by Dataplot. In addition, you should write any data that you want Dataplot to process to an ASCII file. For the sake of discussion, say that this program is called a.out in the current Dataplot directory.

  • Dataplot has a "SYSTEM" command that can be used to execute a local operating system command. For example

      SYSTEM a.out

  • After the SYSTEM command completes, have Dataplot read any needed data that was written to ASCII files by your program.
The above approaches will work for many problems. However, there are some limitations. For example, you cannot add your own Fortran function to the Dataplot list of supported functions. The ability to directly link external Fortran/C functions to another program is powerful, but also platform dependent (e.g., linking DLL libraries under Windows). We will probably investigate these more sophisticated approaches, but this capability is not currently available.
Can I Extract the Dataplot Source Code to Use in My Own Fortran or C Programs? Question: Can I extract the Dataplot source code to use in my own Fortran/C programs?

The short answer is yes. The Dataplot source code is publically available and we do not place any restrictions on its use.

However, the Dataplot code is not structured as independent libraries. This means that you will have to do a little work in order to use it with your own applications. In some cases, it is a fairly trivial process. In other cases, it may not be worthwhile.

We note a few points that you need to be aware of.

  • Dataplot funnels text output through the single routine DPWRST. You can either use this as well, write your own version of DPWRST, or convert the text output to your own system.
  • Dataplot makes use of a large number of common blocks. This is the part that may be most problematic in converting the code to your own use. In many cases, the needed changes will be straightforward. In other cases, it may be fairly difficult.
  • In many cases, Dataplot uses public domain Fortran libaries. These have typically been modified for use by Dataplot (e.g., the I/O has been modified). For that reason, I recommend downloading the original copies of these libraries for your own use.
Return to FAQ list

Date created: 6/5/2001
Last updated: 9/20/2002
Please email comments on this WWW page to

Dataplot ]