Ptplot 5.6 - Java Plotter

Screenshot of PtPlot applet plotting a FourierSeries Authors
Edward A. Lee
Christopher Brooks

Lukito Muliadi
William Wu
Jun Wu

Ptplot is a set of two dimensional signal plotters components written in Java with the following properties:

There is a set of demonstrations of the various capabilities. There are several ways to use the classes in the plot package.

The plot data can be specified in any of three data formats:

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). Editable plots (where a user can interactively modify the data being plotted) are supported by the EditablePlot class.

The above classes define panels that are used by placing them into a user interface context such as an applet or the top-level window of an application. A number of classes are provided to support common situations, but you should keep in mind that these classes are by no means comprehensive. Many interesting uses of the plot package involve writing Java code to create customized user interfaces that include one or more plots. The most commonly used built-in classes are those in the plotml package, which can read PlotML files and the older textual syntax. These classes are include:

The last of these is the class invoked by the ptplot command-line script. It can open plot files, edit them, print them, and save them. There are simpler version of some of these in the plot package that cannot read PlotML files, but can read an older, simpler syntax. The only reason to use these simpler versions is for the slightly smaller jar file sizes, which can improve the responsivity of applets.

TwoPlotExample is a very simple sample Ptplot application that uses only core classes in the plot package, and exercises complete control over the layout of the page.

Backward compatibility with the C pxgraph program is provided in the compat package by the PxgraphApplet and PxgraphApplication classes in the compat package.

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.

Last Updated: $Date: 2007/01/14 00:31:58 $