
Dataplot: Macros

Introduction

The Dataplot installation comes with a large number of
Dataplot programs and macros. Dataplot macros are ASCII text
files that contain Dataplot commands. We make a slight
distinction between macros and programs. Macros are files
that are meant to be run with a user's data set while programs
are files that analyze a specific data file. This is an
organizational distinction and macros and programs are run in
the same manner. The term Dataplot macro will often be used
to refer to both macros and programs.
The links for these file are to the NIST ftp site. If
you have downloaded and installed Dataplot, local copies of
the files are available in the "MACROS" subdirectory of the
Dataplot auxillary directory. For Windows, the default
auxillary directory is "C:\DATAPLOT". For Unix/Linux,
the default auxillary directory is "/usr/local/lib/dataplot".

Purpose of Programs and Macros

These programs and macros serve two purposes:
 Provide useful capabilities that can be applied to your
own data sets.
 Serve as guides for writing your own Dataplot macros.

CALL Command

You can run these macros by entering
where <name> is the name of the macro as given below.

LIST Command

The contents of the file can be displayed on the screen by
entering

Specifying the Location of the Dataplot Auxillary
Directory

If Dataplot cannot find the requested file when you enter
a CALL or LIST command, this indicates that the Dataplot
auxillary directory is not installed in the expected
location on your local platform. Contact your local
system installer to determine the location of the Dataplot
auxillary directory on your local platform.
If the Dataplot auxillary directory is not in the default
location, you can define the environment variable DATAPLO$
(on Windows and Unix/Linux platforms) to tell Dataplot where
the Dataplot auxillary directory is actually located. The
Dataplot installation notes contain instructions for
defining this variable for Windows and Unix/Linux
platforms. For other platforms, contact your local
system installer for guidance.

Menu Macros

For most of these macros, you define a few relevant
parameters, strings, or variables using LET commands
before calling the macro. You can use the LIST command
to find out what the needed LET commands are (these are
typically described in comment lines at the beginning of
the file).
The last table lists a number of macros that are described
as "Menu Macros". These macros explicitly prompt the
analyst for the needed information. The use of menu macros
is particularly helpful for macros that you are writing for
others to use.
Note that menu macros should not be called if you are
running the graphical interface (GUI) version of Dataplot.
The GUI will hang if you try to do any "terminal reads",
and terminal reads are a key component of menu macros.
As an alternative for the GUI, you can extend the GUI
menus. This is described in the
Extending Dataplot web page.

File Associations

The files listed on this page have a ".DP" file extension. The
action taken when you click on a specific file is operating system
and browser dependent. You may want to create a file association
for ".DP" to specify what action you want to occur when you click
on these files. Also note that Linux/Mac OS and Windows have
different endofline conventions for files.
Windows Operating System
There are several ways to create file associations. If you are
unfamiliar with how to create file associations, the following is
one way to do it (you only need to do this once).
 Right click on one of the files and select the
"Save link as ..." option. This option allows you to save
the file. Select a convenient location to save the file
(for our purposes here, the exact location is not important).
 Once you have saved the file, open the File Explorer and bring
up the directory containing the saved file, right click on
the saved file and then select "Properties".
 Under the "General" menu, look for the "Opens with" line and
left click on the "Change" menu.
 This menu will let you select what application to open the
file with. You will most likely want to select a program
that allows you to edit ASCII files. We do not recommend
using Notepad as it is sensitive to the endofline
convention used in the file. Most other applications
(e.g., WordPad, Notepad++) are not sensitive to the
endofline convention used.
Linux Operating System
Under Linux, the method for specifying a file association will
depend on the variant of Linux and the specific desktop/browser
you are using. If you are unfamiliar with how to create a file
association for ".DP" file extensions, we recommend doing a google
search based on your specific Linux variant (e.g., Fedora, Ubuntu)
and the specific file manager and browser being used. Most of the
common applications for editing ASCII files will not be sensitive
to the endofline convention used in the file.

Contents

The following tables lists the available builtin
Dataplot macros.


Basic Statistics and Graphics Dataplot Macros

Basic Statistics and Graphics Macros
2COLUMN.DP

generate a graphics version of a 2column table

CASCADEP.DP

generate a cascade (= waterfall) plot

CONFLIMD.DP

compute a twosided confidence limit for the difference
of means, this is now a
builtin command

CONFLIMI.DP

compute a confidence limit for the mean and produce a
graphics summary table

CONFLIMM.DP

compute a twosided confidence limit for the mean, this
is now a
builtin command

CONFLIMS.DP

compute a twosided confidence limit for the standard
deviation, this
is now a
builtin command

CONVERT_SCREEN_TO_DATA.DP

convert (0,100) screen units into data units of the
preexisting plot

CHECKSYS.DP

check for the operating system, whether device 1 and device 2
have been set and whether you are running in the GUI or the command
line mode

CPUTIME.DP

print the cumulative CPUTIME usage on the current plot

DEFINE_FILES.DP

define standardized input, data and output files (used by
several general purpose macros), uses
DEFINE_FILES_EXTRACT.DP

DEFINE_HEADERS.DP

define standardized headers and trailers for plots (used by
several general purpose macros), uses
DEFINE_HEADERS_EXTRACT.DP

DIGIT.DP

strip out the individual digits of a positive integer

JJFERROR.DP

if Dataplot encounters an error, then stop execution and
prompt the user before proceeding

JJFERRORIGNORE.DP

if Dataplot encounters an error, then ignore it and
continue execution

JJFERROROFF.DP

if Dataplot encounters an error, then ignore it and
continue execution

JJFSIZE.DP

set label, tic mark label and title size to 2.6

JJFTICOFFSET.DP

set tic mark offset units to SCREEN and set to 5 in both
directions for both X and Y axes, can also use
JJFYOFFSET.DP

MDPLOT.DP

generate a Tukey meandifference plot (this is now a
builtin
Dataplot command)

MORTGAG2.DP

perform some basic mortgage calculations

OVERLAP_SCORE.DP

compute the overlap score (= number of overlaps out of
k=choose2)

PLOTTEXT.DP

superimpose text strings on a preexisting plot

SUBPLOT.DP

generate subseries plot of raw data

SUBPLOTR.DP

generate subseries plot of residuals



[ Dataplot /
Dataplot Macros ]


Design of Experiment Dataplot Macros

Design of Experiment Macros
CHECKCLASSIC2LEVEL.DP

for a given row to be printed out horizontally, check to
see if have a classic 2level design (with or without
center points), also called
CHECKCLASSICAL2LEVEL.DP

CHECKCORNERS.DP

for a gDEX contour plot, check the mean values at the
four corner points

CHECKKYX.DP

check for the existence of K, Y, X1, X2, ..., XK

COMPUTESTATS.DP

generate (via "offline" plots) statistics in connection with
dex mean plots (motivation is error bars for dex mean plots)

CONF.DP

compute confounding structure for arbitrary 2level
orthogonal designs, this is now a
builtin command,
CONFOUND.DP is a variant of this macro

CONVERT_TO_CLASSICAL_UNITS.DP

convert the entire design matrix X to (1,+1)

CORE.DP

determine the core vectors spanning the (n1) space (or a
large part of it) for effect estimation in the 10step analysis,
this is now a
builtin command

DEXBOXCO.DP

generates Yates analysis effects plot for various members
of the Box_Cox transformational family

DEXCASE.DP

perform the I/O for a variety of special cases for the
DEX 10step analysis

DEXCLAS1.DP

define NIST dex class table funnel data for 2**3 full
factorial design

DEXCLASS2002.DP

define the 2002 dex class team data (8 teams)
for 2**3 full factorial design (only)

DEXCLASS2007.DP

define the 2007 dex class team data (8 teams) for 2**3 full
factorial design and the 2**(41) fractional factorial design

DEXCOMB.DP

generate combinatorials for groups size 1, 2, and 3

DEXKN.DP

write out k (number of factors) and n (number of runs)
in a shaded box in the upper left corner of the plot

DEXCONT.DP

generate a design of experiments contour plot

DEXCONT2.DP

generate a design of experiments contour plot with SUBSET
specifications

DEXCONTQ.DP

generate a design of experiments contour plot for 2level
designs

DEXFACT2.DP

create all 2term interaction factors

DEXFACT3.DP

create all 2term and 3term interaction factors

DEXPARET.DP

generate a Pareto plot of absolute estimated effects

DEXPLOT1.DP

carry out DEX 10step analysis for a single data set

DEXPLOT.DP

generate 10 plots for the analysis of 2level factorial
designs, uses
DEXPLOTSUB.DP
(this is an early version of
DEX10STEPANALYSIS.DP)

DEXPLOTHISTORY.DP

this is a noop macro which contains a list of some of the
more interesting cases used by DEXPLOT.DP

DEXPLOTINTERROGATE.DP

carry out DEX 10step analysis for a single data set

DEXSCAT1.DP

generate a multiplot of main effects scatter plots

DEXSCAT2.DP

generate a multiplot of main effects and 2term
interaction scatter plots

DEXSSCOR.DP

design of experiment supersaturated correlation,
what main effects are partially confounded with other
main effects

DEXSTAT1.DP

generate a multiplot of main effects statistics plots

DEXSTAT2.DP

generate a multiplot of main effects and 2term interaction
effects statistics plots

DEXSTAT3.DP

generate a multiplot of main effects and 2term and 3term
interaction effects statistics plots

DEXSTAT4.DP

generate a multiplot of statistic plots for a userspecified
statistic (main effects and 2term interactions)

DEXYP64.DP

define the plot character depending on whether n ≥ 64
or n < 64

K2_ANALYSIS.DP

perform a k = 2 factor analysis where both factors are
discrete

REVERT_TO_ORIGINAL_UNITS.DP

revert from 1/+1 coding back to original units

RIGHTMARGINFACTORSANDLEVELS.DP

on an existing sorted response plot, write factors and
levels in right margin

SIMPLEX.DP

generate a mixture experiment simplex triangle
(display the grid and the superimposed data)

SIMPLEX1.DP

generate a mixture experiment simplex triangle with
dotted "axis lines" running through the centroid and with
labels at the corner

SIMPLEX2.DP

generate a mixture experiment simplex triangle and
superimpose design points

SIMPLEX3.DP

generate a mixture experiment simplex triangular grid
(display the grid and the region, but not the data)

SIMPLEXD.DP

generate a mixture experiment simplex triangular grid
(display grid and display data)

SIMPLEXR.DP

generate a mixture experiment simplex triangular grid

TESTORTH.DP

test to see if a design matrix is orthogonal

YATESGEN.DP

generate a ranked list of effects for a general 2level
design, uses
SDIGIT.DP



[ Dataplot /
Dataplot Macros ]


Dataplot Menu Macros



[ Dataplot /
Dataplot Macros ]


Plot Identification, Plot Control and Annotation Dataplot Macros

Plot Identification, Plot Control and Annotation Macros
ANNOTATE.DP

write out a header (and up to 4 subheaders), the specified date,
a page count and a trailer on a plot

ANNOTATE_BOXPLOT_SUBPLOT.DP

used by the step 5 (block plots) of the Dataplot 10step
macros to annotate the plots

COLOR.DP

change color to all plot components

DARKBLUE.DP

set all colors to dark blue

LABELXX.DP

put vertical and horizontal axis labels on a multiplot

LABELYX.DP

put vertical and horizontal axis labels on a multiplot

LOGO.DP

write DATAPLOT logo in lower right corner (variation 1)

LOGO2.DP

write DATAPLOT logo in lower right corner (variation 2)

LOGO3.DP

write DATAPLOT logo in lower right corner (variation 3)

LOGO3B.DP

write DATAPLOT logo in lower right corner (variation 4)

LOGO4.DP

write DATAPLOT logo in lower right corner (variation 5)

MARK.DP

write name of DATAPLOT macro in lower right corner

MARK2.DP

write name of DATAPLOT macro in lower right corner

MARK3.DP

write the contents of the string MARK in the lower right
corner of the plot

MARK4.DP

similar to MARK3.DP

MARK5.DP

similar to MARK3.DP, but print larger size

SHADEBOX.DP

draw a shaded box

SETCOLOR.DP

setup colors and page size for Postscript printer

SIZE2.DP

change all plot related sizes to 2, uses
SIZE_ORIG.DP

JJFCOLOR.DP

define Filliben color settings (set to blue)
COLOR.DP

JJFCOLORBLACK.DP

define Filliben color settings (set to black)
COLOR.DP

WORDPLOT.DP

simplify the creation of encapsulated Postscript files
for inclusion into a Word document



[ Dataplot /
Dataplot Macros ]


Fitting Dataplot Programs

Fitting
HOTELL.DP

compute Hotelling simultaneous confidence limits for
a linear fit

HOTELL2.DP

compute Hotelling simultaneous confidence limits for
the predicted values from a linear fit

IRLS.DP

generate an iteratively reweighted least squares analysis
(10 weight functions supported)

LAD.DP

perform a least absolute deviations or a Lp fit (for
1<=p<=2) via iteratively reweighted least squares

SDPRED.DP

compute linear fit confidence limits for observations



[ Dataplot /
Dataplot Macros ]


One Factor Dataplot Programs



[ Dataplot /
Dataplot Macros ]


MultiFactor Dataplot Programs

MultiFactor
ANOVA.DP

carry out augmented ANOVA analysis, uses
PAIRCOMP.DP and
INTCHAR.DP

ANOVASUB.DP

carry out ANOVAlike analysis, called by
ANOVAALL.DP

BLOCKPLOT_4PLOT.DP

generate 4 block plots: 1.unsorted, 2. sort by mean,
3. sort by range (height of block) and 4. sort residuals
by rannge, uses
BLOCKPLOT_HORIZONTAL_AXIS_SORTED.DP

BLOCKPLOT_STATS_AND_LEGEND.DP

compute block plot statistics and write them out in the
legend area

E691BPH1.DP

generate a box plot of hconsistency statistics
(laboratories within materials) for an ASTM E691 analysis

E691BPH2.DP

generate a box plot of hconsistency statistics
(materials within laboratories) for an ASTM E691 analysis

E691BPK1.DP

generate a box plot of kconsistency statistics
(laboratories within materials) for an ASTM E691 analysis

E691BPK2.DP

generate a box plot of kconsistency statistics
(materials within laboratories) for an ASTM E691 analysis

E691CVPL.DP

generate a Cochran variance plot for (laboratories within
materials) for an ASTM E691 analysis

E691DOH1.DP

generate a dot plot of hconsistency statistic for
(laboratories within materials) for an ASTM E691 analysis

E691DOH2.DP

generate a dot plot of hconsistency statistic for
(materials within laboratories) for an ASTM E691 analysis

E691DOK1.DP

generate a dot plot of kconsistency statistic for
(laboratories within materials) for an ASTM E691 analysis

E691DOK2.DP

generate a dot plot of kconsistency statistic for
(materials within laboratories) for an ASTM E691 analysis

E691PLO1.DP

generate a plot of lab means and lab standard deviations
for each material for an ASTM E691 analysis

E691PLO2.DP

generate some preliminary graphs for an ASTM E691 analysis
 plot of means for each material
 plot of standard deviation for each material
 plot of repeatability standard deviation for each material
 plot of reproducibility standard deviation for each material

E691PLO3.DP

plot of hconsistency statistic for laboratories within
materials for an ASTM E691 analysis

E691PLO4.DP

plot of kconsistency statistic for laboratories within
materials for an ASTM E691 analysis

E691PLO5.DP

plot of hconsistency statistic for materials within
laboratories for an ASTM E691 analysis

E691PLO6.DP

plot of kconsistency statistic for materials within
laboratories for an ASTM E691 analysis

E691PLO7.DP

plot of repeatability standard deviation and reproducibility
standard deviation versus average for an ASTM E691 analysis

GET_ANOVA_FCDF.DP

after a 1way ANOVA, retrieve cdf and pvalue info
from dpst1f.dat file



[ Dataplot /
Dataplot Macros ]


Univariate Dataplot Programs



[ Dataplot /
Dataplot Macros ]


Interlaboratory/SRM Dataplot Programs

Interlaboratory/SRM
CONSENSUS_VALUE_PLOT.DP

generate a consensus value plot, uses
CONSENSUS_VALUE_PLOT_EXTRACT.DP,
COMPUTELABSTATS.DP,
GETANOVAFCDF.DP,
GETALLCVESTIMATES.DP and
NOUR81JUSTIFICATION.DP

GET1CVESTIMATE.DP

for a fixed dataset with lab means and a fixed estimator
method and an input weights vector, normalized the weights
vector and recompute the CV estimator

GET1K2UNCCV.DP

for many WAOS and WAO2 CV estimators, compute the
k = 2 expanded uncertainty

GET1WACVWEIGHTSAND3STATISTICS.DP

for one of five weighted average CV estimators, compute
the CV weights vector, the consensus mean estimate, the
k = 2 expanded uncertainty and the relative k = 2
expanded uncertainty

GET1WACVWEIGHTSAND3STATISTICS.DP

for one of five weighted average CV estimators, compute
the CV weights vector, the consensus mean estimate, the
k = 2 expanded uncertainty and the relative k = 2
expanded uncertainty

GETALLCVESTIMATES.DP

compute 14 consensus value estimators

SRM_9STEP_ANALYSIS.DP

perform a battery of univariate tests for an SRM analysis, uses



[ Dataplot /
Dataplot Macros ]


Quality Control Dataplot Programs

One Factor
AOQSS.DP

generate an Average Outgoing Quality (AOQ) curve for a single
sample plan

ARL_C.DP

generate an Average Run Length (ARL) curve for a C
(proportions) control chart

ARL_P.DP

generate an Average Run Length (ARL) curve for a P
(counts) control chart

ARL_XBAR.DP

generate an Average Run Length (ARL) curve for a XBAR
control chart

ATISS.DP

generate an Average Total Inspection (ATI) curve for a single
sample plan

OC_C.DP

generate an Operating Characteristic (OC) curve for a C
(proportions) control chart

OC_P.DP

generate an Operating Characteristic (OC) curve for a P
(counts) control chart

OC_SSA.DP

generate an Operating Characteristic (OC) curve for a
single sample plan (hypergeometric)

OC_SSB.DP

generate an Operating Characteristic (OC) curve for a
single sample plan (binomial)

OC_XBAR.DP

generate an Operating Characteristic (OC) curve for a XBAR
control chart



[ Dataplot /
Dataplot Macros ]


Multivariate Analysis Dataplot Programs



[ Dataplot /
Dataplot Macros ]


Distributional and Reliability Analysis Dataplot Programs



[ Dataplot /
Dataplot Macros ]


Time Series



[ Dataplot /
Dataplot Macros ]


Date created: 06/05/2001
Last updated: 03/17/2023
Please email comments on this WWW page to
alan.heckert@nist.gov.
