All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----ptplot.Pxgraph
pxgraph X Windows system program.
The pxgraph script is a Bourne shell script that
attempts to call Java with the proper environment. The
pxgraph script has the following usage:
pxgraph [ options ] [ =WxH+X+Y ] [file . . .]
Below we describe the pxgraph arguments. The
text is based on the xgraph Unix man page written
by David Harrison (University of California).
To see the command line options, you can type
pxgraph -help.
The pxgraph program draws a graph on a display given data
read from either data files or from standard input if no
files are specified. It can display up to 64 independent
data sets using different colors and/or line styles for each
set. It annotates the graph with a title, axis labels,
grid lines or tick marks, grid labels, and a legend. There
are options to control the appearance of most components of
the graph.
The input format is similar to graph(1G) but differs
slightly. The data consists of a number of data sets. Data
sets are separated by a blank line. A new data set is also
assumed at the start of each input file. A data set consists
of an ordered list of points of the form directive
X Y.
The directive is either draw or move and can be
omitted. If the directive is draw, a line will be drawn
between the previous point and the current point (if a line
graph is chosen). Specifying a move directive tells
xgraph not to draw a line between the points. If the directive
is omitted, draw is assumed for all points in a data
set except the first point where move is assumed. The
move directive is used most often to allow discontinuous
data in a data set.
After pxgraph has read the data, it will create a new window
to graphically display the data.
Once the window has been opened, all of the data sets will
be displayed graphically (subject to the options explained
below) with a legend in the upper right corner of the
screen. To zoom in on a portion of the graph, depress a
mouse button in the window and sweep out a region. pxgraph
will then the window will be redrawn with just that portion of
the graph. pxgraph also presents four control buttons in
the lower left corner of each window: Exit,
Print, HTML and About.
The Exit button will exit the process. You can also
type Control-D, Control-C or q
to exit.
The Print button brings up a print dialog window.
The About button brings up a message about
pxgraph.
The HTML button prints an HTML file to stdout that
can be used to display the file with applet Plot classes
(Experimental).
pxgraph accepts a large number of commmand line options.
A list of these options is given below.
=WxH+X+Y
-<digit> <name>
-bar
-brb.
Usually, the -nl flag is used with this option.
The point itself is located at the center of the bar.
-bb
-tk).
Unsupported in the Java version.
-bd <color>
pxgraph window.
Unsupported in the Java version.
-bg <color>
pxgraph window.
In the Java version, this argument takes hexadecimal color values
(fffff), not color names.
-binary
-binary
argument is the primary difference between xgraph
and pxgraph. The
Ptolemy Project software
makes extensive use of -binary.
d <4byte float> <4byte float>
e
n <dataset name>\n
\n
m <4byte float> <4byte float>
od command. Note that the first character is a d
followed by eight bytes of data consisting of two floats of four bytes.
cxh@carson 324% od -c data/integrator1.plt 0000000 d \0 \0 \0 \0 \0 \0 \0 \0 d ? 200 \0 \0 ? 200 0000020 \0 \0 d @ \0 \0 \0 @ , 314 315 d @ @ \0 \0
-brb <base>
-brw <width>
-bw <size>
pxgraph window.
Unsupported in the Java version.
-db
-fg <color>
fffff), not color names.
-gw -gs -impulses pxgraph,
but it is similar to -nl -bar).
-lf <fontname>
helvetica-PLAIN-12.
-lnx -lny -lw width -lx <xl,xh> -ly) can be used
to zoom in on a particularly interesting portion of a
larger graph.
-ly <yl,yh> -m -M
-m but markers are assigned uniquely to each
eight consecutive data sets (this corresponds to each
different line style on color machines).
-nl
-m,
-M, -p, or -P this can be used
to produce scatter plots. When used with -bar, it can be used to
produce standard bar graphs.
-p
-P
-p but marks each pixel with a large dot.
-rv
-t <string>
-tf <fontname>
-lf description above
for how to specify fonts.
The default is helvetica-BOLD-14
-tk
pxgraph to draw tick marks rather
than full grid lines. The -bb option is also useful
when viewing graphs with tick marks only.
-x <unitname>
-y <unitname>
-zg <color>
-zw <width>
xgraph program allowed many formatting
directives inside the file. This version only supports
draw and move.
xgraph program allowed blank lines
to separate datasets. This version does not. Instead, use the
move X Y directive.
pxgraph
script instead of the X11 pxgraph binary within Ptolemy.
www.javasoft.com.
Pxgraph works best under JDK1.1.4. Under JDK1.0.2,
the Print and About buttons will not work.
http://ptolemy.eecs.berkeley.edu/java/ptplot.
cd to $PTOLEMY/tycho/java and ungzip and
untar the tar file:
cd $PTOLEMY/tycho/java gzcat /tmp/ptplot1.0.tar.gz | tar -xf
pxgraphshell script reads
a few environment variables and attempts to run. For the script to
run, it needs to find the location of the Java JDK installation and
the location of the Ptplot .class files.
To find the Ptplot .class files, the script reads the
TYCHO and PTOLEMY variables and looks in
PTOLEMY/tycho/java/ptplot. If you do not have Ptolemy
or Tycho installed, you can edit the pxgraph script
and change TYDEFAULT so that the Pxgraph.class
file will be found at $TYDEFAULT/java/ptplot/Pxgraph.class
pxgraph binary to a safe place and
create a link to the Java Ptplot pxgraph script.
cd $PTOLEMY/bin.$PTARCH mv pxgraph pxgraph.x11 ln -s ../tycho/java/plot/pxgraph .
For further information about this tool, see the Java Plot Website.
public Pxgraph(String args[])
public boolean action(Event e,
Object arg)
public boolean handleEvent(Event e)
public boolean keyDown(Event e,
int key)
public static void main(String args[])
pxgraph shell script, then
type pxgraph -help for the complete set of arguments.
All Packages Class Hierarchy This Package Previous Next Index