WaveGraph can send the graphic requests to PV-WAVE using a CGI script. Data to be plotted is passed in binary format. A method of communicating with a local PV-WAVE based server via a file is also supported for standalone applications. We plan on supporting IIOP in the future for speed and standards compliance.
WaveGraph creates a ContainerView which can contain either a static image (2D or 3D plot) or an animation sequence, with appropriate methods available to start, stop, increment, and animate at a given rate and direction. Also, it can direct the browser to display a VRML world, provided the browser is capable of displaying the VRML mime type.
Most plotting keywords supported by PV-WAVE are available as mutator methods of the form "setKeyword", such as "setXRange", "setTicklen" etc. Classes derived from WaveGraph only need to implement those methods that are unique.
WaveGraph saves all of its instance data in protected variables and provides "addKeyword" methods so that classes derived from WaveGraph can access this data and select which data to send to PV-WAVE as part of a graphic request.
// // Initialize the WavePlot component with a position, size, and // URL for the server to be used to process the graphic requests. // plot = new WavePlot( 25, 30, 400, 300 ); plot.setServer( "http://vrml.boulder.vni.com" ); mainRootView().addSubview( plot ); // // Create some dummy random data and associate it with the plot // double[] data = new double[100]; for(int i =0; i<100; i++) data[i]=Math.random(); plot.setY( data ); // // Set some attributes for the plot // plot.setRegion( .01, .05, .95, .95 ); plot.setYRange( 0, 1.25); plot.setYStyle( 1 ); plot.setTitle( "Test Plot" ); plot.setSubtitle( "Random Data" ); plot.setXTitle( "X Axes" ); plot.setYTitle( "Y Axes" ); plot.setColor( "cyan" ); // // Draw the plot // plot.plot();