|
|
Dataplot Frequently Asked Questions (FAQS)
Installation Questions
|
|
Printing Questions
|
|
Data and I/O Questions
|
|
Graph Construction Questions
|
|
Fitting and Data Analysis Questions
|
|
Dataplot Programming Questions
|
|
|
|
|
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 Windows, Linux/Unix and MacOS downloads. The Linux/Unix and MacOS are source builds while the Windows version downloads a pre-built executable.
|
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 under Windows, check the following:
|
Return to FAQ list
|
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 Linux/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:\Program Files (x86)\NIST\DATAPLOT\FRSCRIPT\XDPCONFIG".
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.
|
Return to FAQ list
|
On what platforms does Dataplot run?
|
Question: On what platforms does Dataplot run?
|
Dataplot is available as a binary installation on Windows platforms (it should run under Windows 7/8/10/11). Note that for the Linux-like enviornments under Windows (e.g., CygWin, MSYS, MINGW and WSL) Dataplot can be built from the source code as it is for Linux operating systems. Dataplot can be built from source for Linux/Unix platforms. We currently test this build for RedHat Fedora, Rocky 8 (this is essentially RedHat Enterprise 8), Ubuntu, SUSE and Manjaro. In addition, we build on Cygwin, MSYS and MINGW. WSL is essentially Ubuntu. Building on other Linux/Unix platforms should be straightforward. The primary requirement is that the gfortran/gcc compilers be installed. Dataplot can optionally utilize several external libraries if available, but these are not essential. There may be limited support for binary "package" installs for a few select Linux platforms. Building Dataplot for MacOS is essentially equivalent to a Linux source build. We do not currently provide native installations for smart phones or tablets. There are Linux installations available for Android, although we have not explicitly tested this.
|
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. Dataplot typically generates its graphics output in Postscript format (there is an option for the Postscript graphs to be automatically converted to PDF format). The first question is whether the desired program can import Postscript (or PDF) directly. For example, there are several packages that allow LaTex to import Postscript or PDF documents. Word processing software, e.g. Word, is less likely to support direct importing of Postscript/PDF files. We have found the following methods to work reasonably well.
If you are generating multiple graphs to be imported, it is typically desirable to create each graph in a separate file. You can do this as follows device 2 close set ipl1na plot1.ps device 2 postscript ... generate plot 1 ... device 2 close set ipl1na plot2.ps device 2 postscript ... generate plot 2 ... device 2 closeThe command "set ipl1na" defines the name of the plot file. Note that this must come before the "device 2 postscript" command. Dataplot uses a default name of "dppl1f.dat". However, if you are generating multiple graphs, using the default name will overwrite the previous graph whenever you enter a new "device 2 postscript" command.
|
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 Linux/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
The above command assumes that your printer supports the printing of Postscript files. This should be the case for most printers used in a Unix/Linux environment. If your printer does not support Postscript, 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?
|
Open the Postscript (or PDF) file using Ghostview. Then use the Print option (under the File menu) in Ghostview to print the graph. Note that there are other programs that can be used to view and print Postscript files.
|
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?
|
The Dataplot command PP is used to print the most recent plot in Dataplot. Under Linux/UNIX, Dataplot issues the following command:
Under Windows, Dataplot issues the following command:
In order for the PP command to work under Windows, the Ghostview/Ghostscript software must be installed. If the software is installed and the PP command is not working, check the file "C:\Program Files (x86)\NIST\DATAPLOT\DPLOGF.TEX". Check that the line
|
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 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 There are 2 basic approaches to creating your own named plot files.
|
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:
ORIENTATION PORTRAIT PLOT X**2 FOR X = 1 1 10 EXIT
ORIENTATION PORTRAIT FRAME COORDINATES 10 20 90 90 PLOT X**2 FOR X = 1 1 10 EXIT 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
In summary, therefore, for a 2 by 2 multiplot, the following code yields nice output for portrait mode:
. ORIENTATION PORTRAIT . MULTIPLOT 2 2 MULTIPLOT COORDINATES 10 20 90 90 FRAME COORDINATES 10 20 90 85 . CHARACTERS CIRCLE CHARACTER FILL ON CHARACTER HW 1 1.4 . Y1LABEL Y XLABEL X . PLOT X FOR X = 1 1 10 PLOT X**2 FOR X = 1 1 10 PLOT X**3 FOR X = 1 1 10 Y1LABEL OFFSET 10 PLOT X**4 FOR X = 1 1 10 . EXIT
|
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?
|
Dataplot does not have native support for reading Excel files. Here are several ways you can read data that is stored in an Excel spreadsheet.
This is discussed in more detail in ASCII files.
|
Return to FAQ list
|
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. Dataplot 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
|
Return to FAQ list
|
Can I Read Character Data into Dataplot?
|
Question: Can I read character data into Dataplot?
|
By default, Dataplot expects data entered using the READ command to be numeric data only. However, Dataplot does provide some limited suupport for character data. Character data typically is one of the following
If your data file contains character data, then you can do one of the following
|
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 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 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 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 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
|
Return to FAQ list
|
How Do I Generate Text with Upper and Lower Case Script?
|
Question: In a Dataplot macro, I had
|
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:
LOWER (lower case) ASIS ("as is", whatever mixture you have in the string)
LABEL CASE ASIS TIC LABEL CASE ASIS LEGEND CASE ASIS CASE ASIS
|
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
TITLE CASE ASIS TITLE DISPLACEMENT 2 LET X = SEQUENCE 1 1 10 LET Y = X**2 CHARACTERS X CIRCLE CHARACTER HW 2 1 5 4 LINES BLANK BLANK PLOT Y X AND PLOT Y X SUBSET X 7.5 TO 8.5
|
Return to FAQ list
|
How Do I Have Two Different Left/ |
Right Axis Labels?
Question: I have a function
|
Inasmuch as the default Dataplot settings for tic labels are such that
|
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:
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:
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. For example, if one wants to capture the text output from a quadratic fit to the file XYZ., then one would enter
|
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:
|
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:
R REPEAT 1 R 1
L
|
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,Dataplot will search the directory where Dataplot's auxiliary files are kept. PC WINDOWS: If you installled Dataplot using the "setup.exe" file, the environment variable DATAPLO$ is automatically created to specify the Dataplot directory. By default, this directory is "C:\Program Files (x86)\NIST\DATAPLOT". If you installed Dataplot in a non-standard way (i.e., not using the "setup.exe" file), you need to create the environment variable DATAPLO$ that specifies the appropriate directory (do a Google search of "creating environment variables under Windows" for instructions on how to do this). Alternatively, you can create a batch file to run Dataplot that contains the following two lines (assume Dataplot is installed in "C:\DATAPLOT")
C:\DATAPLOT\DATAPLOT.EXE -extrawide -tile Linux/UNIX/MacOS: Dataplot looks secondarily for dplogf.tex in your home directory (typically stored in the environment variable "HOME"). If Dataplot does not find dplogf.tex in the current directory or your home directory, it will search Dataplot's auxiliary directory. The default location for this directory is defined when Dataplot is built. You can override this location by defining the environment variable DATAPLOT_FILES. For example, if you use the bash shell, you can enter something like
export DATAPLOT_FILES
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.
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:
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.
|
Return to FAQ list
|
Date created: 06/05/2001 |
Last updated: 04/12/2023 Please email comments on this WWW page to alan.heckert@nist.gov. |