JavaScript Interface to Ptplot

This is a sample JavaScript interface to Ptplot that allows the user to adjust various Ptplot parameters. To bring up a sample plot, change the various settings and then click on the Plot button. To get a description of the various fields, click on the name of field to get to the help page. See also the Limitations section below.
Width Height
Background Color
(Hex number #000000 - #111111)
Foreground Color
(Hex number #000000 - #111111)
URL Base
File to plot
Title Text
Title Font Label Font
X Axis Label Y Axis Label
Bars Binary No Lines Ticks
Small Points Large Points ReverseVideo Display args


How it works

  1. The HTML file includes Ptplot.js which contains JavaScript code.
  2. When the Plot button is clicked, the JavaScript ptplot() function is passed the form.
  3. The ptplot() function generates HTML that reflects the settings in the form. The generated HTML includes the <APPLET tag.
    Note that the About button in the generated HTML implemented by having JavaScript call the getAppletInfo() public method.

Limitations

  • Since this is an applet, you can only plot data from the server. It might be possible to use the INPUT TYPE="FILE" HTML FORM element to submit files to be plotted.
  • Some of the datasets are binary datasets, so you must check the binary checkbox. In the File to plot select box below, all the files in the data/ directory are binary files.
  • The File to plot select box uses spaces as file separators. This allows us to plot graphs that consist of more than one dataset.
  • The Title Font and Label Font selectors should allow more than one style. Helvetica-BOLD-ITALIC-12 should be allowed.
  • The layout of the controls is rather ugly.
  • Resources

  • Netscape JavaScript Documentation
  • Netscape HTML Documentation
  •