|
Authors
Edward A. Lee
Christopher Hylands
Contributors
William Wu
|
Description
This is a set of two dimensional signal plotters components
written in Java with the following properties:
- Embeddable in applets or applications.
- Binary or ASCII data.
- Auto-ranging.
- Automatic or manual labeling of axes.
- Automatic or manual tick marks.
- Live, animated plots.
- Infinite zooming.
- Various plot styles: connected lines, scatter plot, bars, etc.
- Various point styles: none, dots, points, and unique marks.
- Multiple data sets and a legend.
- Color or black and white plotting.
The applet implementation
can read data to plot from a URL or construct the data in custom
Java code. The application can read data from a URL and use
command-line arguments to format the plot. The command-line arguments
are compatible with the popular Unix signal plotter xgraph
.
There is a set of demonstrations of these classes.
The main class implementing the plotter component is
Plot.
It is derived from
PlotBox,
which provides only the axes and decorations of the plot.
This is implemented in a base class so that it can be reused for different
kinds of plots.
Live (animated) data plots are supported by the
PlotLive class.
This class is abstract; a derived class must be created to generate
the data to plot (or collect it from some other application).
The application is implemented by the
Pxgraph class. The Pxgraph
class
includes support for printing and generating HTML for use with the
Plot
applet.
This code owes a heavy debt to David Harrison, the original author
of xgraph
, which runs under the X window system on Unix
platforms. An extension to xgraph
called
pxgraph
, written by Joe Buck, reads binary files as well
as ASCII. For compatibility with these programs, we have provided a
Bourne Shell script called pxgraph
that is a drop-in
replacement for either xgraph
or pxgraph
.
Unlike the original program, however, the Java implementation does not
depend on the X window system. We have provided a DOS batch file
called pxgraph.bat
that brings pxgraph
capability to Windows platforms.
The changes between ptplot1.0 and ptplot1.1:
Up to the Ptolemy Java Website -
Forward to the Demonstrations
Copyright © 1997, The Regents of the University of California.
All rights reserved.
Last updated: 11/01/97,
comments to: eal@eecs.berkeley.edu
Ptolemy Java Ptplot Website:
http://ptolemy.eecs.berkeley.edu/java/ptplot