Grace is a tool to make two-dimensional plots of scientific data. It runs under various (if not all) flavours of UNIX with X11 and Motif. Its capabilities are roughly similar to GUI-based programs like Sigmaplot or Microcal Origin plus script-based tools like Gnuplot or Genplot. Its strength lies in the fact that it combines the convenience of a graphical user interface with the power of a scripting language which enables it to do sophisticated calculations or perform automated tasks.
Grace is derived from Xmgr (a.k.a. ACE/gr), originally written by Paul Turner.
From version number 4.00, the development was taken over by a team of volunteers under the coordination of Evgeny Stambulchik.
When its copyright was changed to GPL, the name was changed to Grace, which stands for ``GRaphing, Advanced Computation and Exploration of data'' or ``Grace Revamps ACE/gr''. The first version of Grace available is named 5.0.0, while the last public version of Xmgr has the version number 4.1.2.
Paul still maintains and develops a non-public version of Xmgr for internal use.
Copyright (©) 1991-95 Paul J Turner, Portland, OR
Copyright (©) 1996-99 Grace Development Team
Maintained by Evgeny Stambulchik
All Rights Reserved
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
./configure --help
to get list of additional switches specific to Grace./configure <options>
. Just an example:
% ./configure --enable-grace-home=/opt/grace --enable-extra-incpath=/usr/local/include:/opt/include \ --enable-extra-ldpath=/usr/local/lib:/opt/lib --prefix=/usrwould use
/usr/local/include
and
/opt/include
in addition to the default include path
and /usr/local/lib
and /opt/lib
in addition
to the default ld path. As well, all stuff would be put under
the /opt/grace directory and soft links made to
/usr/bin
, /usr/lib
and /usr/include
.
Note: If you change one of the
--enable-extra-incpath
or
--enable-extra-ldpath
options from one run of
configure to another, remember to delete the
config.cache
file!!!
There is one configure switch which must be paid a special
attention to: --enable-config
. Some pre-defined
configurations exist: look in the conf
direcory for
the list. Some OS/hardware combinations have more than one
configuration file - you'll have to use the switch to choose
an alternative one.
make
If something goes wrong, try to see if the problem has been
described already in the Grace FAQ (in the
doc
directory).
make tests
make install
make links
The later (optional) step will make soft links from some files
under the Grace home directory to the system-wide default
locations (can be changed by the --prefix
option
during the configuration, see above).
Not written yet...
A project file contains all information necessary to restore a plot created by Grace, as well as some of preferences. Each plot is represented on a single page, but may have an unlimited number of graphs.
A graph consists of (every element is optional): a graph frame, axes, a title and a subtitle, a number of sets and additional annotative objects (time stamp string, text strings, lines, boxes and ellipses).
A set is a way of representing numerical data (datasets). It consists of a pointer to a dataset plus a collection of parameters describing the visual appearance of the data (like color, line dash pattern etc).
A dataset is a collection of points with x and y coordinates, up to four optional data values (which, depending on the set type, can be displayed as error bars or like) and one optional character string.
Regions are sections of the graph defined by the interior or exterior of a polygon, or a half plane defined by a line. Regions are used to restrict data transformations to a geometric area occupied by region.
In many cases, when Grace needs to access a file given with a
relative pathname
, it searches for the file along the
following path:
./pathname:./.grace/pathname:~/.grace/pathname:$GRACE_HOME/pathname
Arrange the graphs in a grid rows by cols
Override any parameter file settings
Execute batch_file on start up
Assume data file is block data
Form a set from the current block data set using the current set type from columns given in the argument
Arrange graphs in gcols columns
Read data from descriptor (anonymous pipe) on startup
Set default hardcopy device
Set canvas size fixed to width*height
Use free page layout
Set the current graph number
Set the type of the current graph
No interactive session, just print and quit
Install private colormap
Turn the graph legend on
Set the axis scaling of the current graph to logarithmic
Open the log window
Set the number of columns for block data (default is 30)
Set the number of boxes
Set the number of ellipses
Set the number of lines
Set the number of strings
Run Grace in monochrome mode (affects the display only)
Assume the answer is yes to all requests - if the operation would overwrite a file, Grace will do so without prompting
Don't use private colormap
No log window, overrides resource setting
In batch mode, do not print
Don't catch signals
Read data from named pipe on startup
Assume data file is in X Y1 Y2 Y3 ... format
Load parameters from parameter_file to the current graph
Interpret string as a parameter setting
Read data from stdin on startup
file Save print output to file
Remove data file after read
Write the results from regression to results_file
Arrange graphs in grows rows
Exchange the color indices for black and white
Save all graphs to save_file
Integer seed for random number generator
Source type of next data file
Set timer for named pipes to delay ms
Add timestamp to plot
Set the type of the next data file
Show the program version
Set the viewport for the current graph
Set the working directory
Set the world coordinates for the current graph
This message
Set the location of Grace. This will be where help files, auxiliary programs, and examples are located. If you are unable to find the location of this directory, contact your system administrator.
Print command. If the variable is defined but is an empty string, "Print to file" will be selected as default.
The editor used for manual editing of dataset values.
The HTML viewer for on-line browsing of help documents
These flags control behavior of the FFTW planner (see README.FFTW for detailed info)
Upon start-up, Grace loads its init file, gracerc
. The file
is searched for in the
magic path; once
found, the rest of the path is ignored. It's recommended that in the
gracerc
file, one doesn't use statements which are part of
a project file - such defaults, if needed, should be set in the
default template.
Whenever a new project is started, Grace loads the default template,
templates/Default.agr
. The file
is searched for in the
magic path; once
found, the rest of the path is ignored. It's recommended that in the
default template, one doesn't use statements which are NOT part of
a project file - such defaults, if needed, should be set in the
gracerc
init file.
The following Grace-specific X resource settings are supported:
It is also possible to customize menus by assigning key accelerators to any item.
The list below describes the menu X resources. For example, in order to make Grace popup the Non-linear curve fitting by pressing Control+F, you would add the following two lines
XMgrace*transformationsMenu.nonLinearFit.acceleratorText: Ctrl+F
XMgrace*transformationsMenu.nonLinearFit.accelerator: Ctrl<Key>f
to your .Xresources
file (the file which is read when an X
session starts; it could be .Xdefaults
, .Xsession
or
some other file - ask your system administrator when in doubt).
-> fileMenu
* open
* save
* saveAs
* describe
-------------
-> readMenu
* sets
* parameters
* blockData
-> writeMenu
* sets
* parameters
-------------
* clearAll
-------------
* print
* deviceSetup
-------------
* workingDirectory
-------------
* exit
-> editMenu
* dataSets
* setOperations
-------------
* arrangeGraphs
* overlayGraphs
* autoscale
-------------
-> regionsMenu
* status
* define
* clear
* reportOn
* hotLinks
-------------
* setLocatorFixedPoint
* clearLocatorFixedPoint
* locatorProps
-------------
* preferences
-> dataMenu
-> dataSetOperationsMenu
* Sort
* reverse
-------------
* dropPoints
* pruneData
* geometricTransforms
-> regionOperationsMenu
* evaluate
* extractPoints
* extractSets
* deletePoints
* killSets
-------------
-> transformationsMenu
* join
* split
* evaluateExpression
* histograms
* fourierTransforms
* regression
* nonLinearFit
* runningAverages
* differences
* seasonalDifferences
* integration
* correlation
* interpolation
* splines
* samplePoints
* digitalFilter
* linearConvolution
* featureExtraction
-> plotMenu
* plotAppearance
* graphAppearance
* setAppearance
* axisProperties
-> viewMenu
() showLocatorBar
() showStatusBar
() showToolBar
-------------
* redraw
-> windowMenu
* commands
* pointTracking
* drawingObjects
* fontTool
* results
-> helpMenu
* onContext
* userGiude
* tutorial
* faq
* changes
* comments
-------------
* licenseTerms
* about
This is a very brief guide describing problems and workarounds for reading in project files saved with Xmgr. You should read the docs or just play with Grace to test new features and controls.
Not written yet... Read Tutorial.
When the pointer focus is on the canvas (where the graph is drawn), there are some shortcuts to activate several actions. They are:
A single click inside a graph switches focus to that graph. This is the default policy, but it can be changed from the "Edit/Preferences" popup.
Double clicking on parts of the canvas will invoke certain actions or raise some popups:
The double clicking actions can be enabled/disabled from the "Edit/Preferences" popup.
Not written yet...
Not written yet...
Not written yet...
Command | Description |
PAGE SIZE xdim ydim | set page dimensions (in pixels) of terminal device (Display) |
DEVICE devname PAGE SIZE xdim ydim | set page dimensions (in pixels) of device devname |
DEVICE devname DPI dpi | set device's dpi (dots per pixel) |
DEVICE devname FONT onoff | enable/disable usage of built-in fonts for device devname |
DEVICE devname FONT ANTIALIASING onoff | enable/disable font aliasing for device devname |
DEVICE devname OP options | set device specific options (see Device-specific settings) |
HARDCOPY DEVICE devname | set device devname as current hardcopy device |
|
Not written yet...
Not written yet...
Grace permits quite complex typesetting on a per string basis. Any string displayed (titles, legends, tick marks,...) may contain special control codes to display subscripts, change fonts within the string etc.
Example:
F\sX\N(\xe\f{}) = sin(\xe\B)\c7\Ce\S-X\N\c7\Ccos(\xe\f{})
prints roughly
-x
F (e) = sin(e)·e ·cos(e)
x
using string's initial font and e prints as epsilon from the Symbol font.
NOTE:
Characters from the upper half of the char table can be entered directly
from the keyboard, using appropriate xmodmap(1)
settings, or
with the help of the font tool ("Window/Font tool").
Some of the output devices accept several configuration options. You can set the options by passing a respective string to the interpreter using the "DEVICE devname OP options" command (see Device parameters). A few options can be passed in one command, separated by commas.
Command | Description |
grayscale | set grayscale output |
color | set color output |
level1 | use only PS Level 1 subset of commands |
level2 | use also PS Level 2 commands if needed |
xoffset:x | set page offset in X direction x pp |
yoffset:y | set page offset in Y direction y pp |
|
Command | Description |
grayscale | set grayscale output |
color | set color output |
bbox:tight | enable "tight" bounding box |
bbox:page | bounding box coinsides with page dimensions |
|
Command | Description |
binary | set binary output |
binary:on | same |
ascii:off | same |
ascii | set ASCII output |
ascii:on | same |
binary:off | same |
|
Command | Description |
interlaced:on | make interlaced image |
interlaced:off | don't make interlaced image |
transparent:on | produce transparent image |
transparent:off | don't produce transparent image |
|
Command | Description |
format:pbm | output in PBM format |
format:pgm | output in PGM format |
format:ppm | output in PPM format |
rawbits:on | "rawbits" (binary) output |
rawbits:off | ASCII output |
|