PHP graphic software--PtPlot
| Download |
Chart gallery |
0/0 |

Ptplot is a set of two dimensional signal plotters components
written in Java with the following properties:
- Embeddable in applets or applications.
- Auto-ranging.
- Automatic or manual labeling of axes.
- Automatic or manual tick marks.
- Logarithmic axes.
- 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.
- Error bars.
- Editable plots.
- PlotML, and XML language for specifying plots.
- Compatibility with pxgraph, an older plotting program.
There are several
ways to use the classes in the plot package.
- You can invoke an executable, ptplot, which is a
shell script, to plot data on the local file system or on
the network.
- You can invoke an executable, pxgraph, which is
a shell script, to plot data that is stored in binary format
compatible with the older program pxgraph.
- You can invoke a Java application, such as PlotMLApplication,
by setting your CLASSPATH variable appropriately and using
the
java executable that is included in your
Java distribution.
- You can reference an existing applet class, such as PlotMLApplet,
in an HTML file. The applet parameters, such as dataurl,
give the plot data and format information, either by referring
to another file on the network, or by directly including
the information. You do not even have to have Ptplot installed
on your server, since you can always reference the Berkeley
installation.
- You can create new classes derived from applet, frame,
or application classes to customize your plots. This allows
you to completely control the placement of plots on the screen,
and to write Java code that defines the data to be plotted.
The plot data can be specified in any of three data formats:
- PlotML is an XML extension for plot data. Its syntax is
similar to that of HTML.
- An older, simpler syntax for plot data is also provided,
although in the long term, that syntax is unlikely to be
maintained (it will not necessarily be expanded to include
new features). For simple data plots, however, it is adequate.
Using it for applets has the advantage of making it possible
to reference a slightly smaller jar file containing the code,
which makes for more responsive applets.
- A binary file format used by the popular pxgraph program,
an extension of xgraph, is supported by classes in the compat package.
There is also a shell script, called pxgraph, which
invokes these classes. Formatting information in pxgraph
(and in the compat package) is provided by command-line arguments,
rather than being included with the plot data, exactly as
in the older program. Applets specify these command-line
arguments as an applet parameter.
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:
- PlotMLApplet: A simple applet that can read PlotML files off the web and
render them.
- EditablePlotMLApplet: A version that allows editing of any data set in
the plot.
- PlotMLFrame: A top-level window containing a plot defined by a PlotML file.
- PlotMLApplication: An application that can be invoked from the command
line and reads PlotML files.
- EditablePlotMLApplication: An extension that allows editing of any data
set in the plot.
|
|
|