Ptplot 1.1 - Java Plotter

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

Contributors
William Wu


  • Applet Demonstrations
  • The Java documentation for these classes
  • Download sources, .class files and demos: 180k Gzipped Tar File - 240k Compressed Zip File
  • Download only the .class files: 52k Uncompressed Zip File

  • Description

    This is a set of two dimensional signal plotters components written in Java with the following properties: 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:

  • In 1.1, PlotBox extends Panel. In 1.0 PlotBox extended Applet. This makes it much easier to use Plot as an component in either an application or an applet that contains other components.
  • The PlotApplet class is new in 1.1. PlotApplet can be used for applets that use the Plot class, or the PlotLive class. As a result, the html applet tags for the demos now use code="ptplot.PlotApplet". Formerly, they used code="ptplot.Plot"
  • The directory structure has been reorganized so that the plot classes are in ptplot, and the demo classes are in ptplot/demo. This means that the ptplot.zip does not contain the demo classes, which is better if anyone actually wants to _use_ the plotter instead of just running the demos.
  • There is a Playing Wave Applet that uses real time audio.
  • Edward Lee fixed a bar graph label bug reported by Marc Ellis.
  • A few other minor bugs were fixed.

  • 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