atropos.plot
Class GnuPlot

java.lang.Object
  |
  +--atropos.plot.GnuPlot
All Implemented Interfaces:
java.io.Serializable

public class GnuPlot
extends java.lang.Object
implements java.io.Serializable

This class implements a customized gnuplot plotting capability.

This research is funded by DARPA/ITO Contract Number: F30602-98-C-0230 supported by the Air Force Research Laboratory/IF.

Version:
$Revision: 1.1.1.1 $ $State: Exp $
Author:
Steve Bush
See Also:
Serialized Form

Constructor Summary
GnuPlot(java.lang.String d, java.lang.String gf, java.lang.String df, java.lang.String n, boolean On)
          Set the initial parameters for the plot files.
 
Method Summary
 void plot(java.lang.String value)
          Record a plot value.
 java.lang.String plotCommand()
          Builds the plot command for the gnuplot file.
 void setLineTitle(java.lang.String lt)
          Set the line title option within the gnu plot statement.
 void setNode(java.lang.String n)
          Set the node name.
 void setOutput(java.lang.String o)
          Set the output file name.
 void setTerminal(java.lang.String t)
          Set the terminal type for the gnuplot output.
 void setTitle(java.lang.String t)
          Set the overall plot title.
 void setUsing(java.lang.String u)
          Set the "using" option within the gnu plot statement.
 void setWith(java.lang.String w)
          Set the "with" option in the gnu plot command.
 void setXlabel(java.lang.String x)
          Set the graph X label.
 void setYlabel(java.lang.String y)
          Set the graph Y label.
 void setZlabel(java.lang.String z)
          Set the graph Z label.
 java.lang.String splotCommand()
          Builds the plot command for the gnuplot file.
 java.lang.String toString()
          Returns the complete gnuplot filename and data filename.
 void writeGnuPlot()
          Write the gnuplot file.
 void writeGnuSplot()
          Write the gnuplot file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GnuPlot

public GnuPlot(java.lang.String d,
               java.lang.String gf,
               java.lang.String df,
               java.lang.String n,
               boolean On)
Set the initial parameters for the plot files.
Parameters:
d - The directory for plot files.
gf - The gnu plot file name.
df - The data file name.
n - The node name.
Method Detail

plotCommand

public java.lang.String plotCommand()
Builds the plot command for the gnuplot file.
Returns:
The gnu plot command line.

splotCommand

public java.lang.String splotCommand()
Builds the plot command for the gnuplot file.
Returns:
The gnu plot command line.

writeGnuPlot

public void writeGnuPlot()
Write the gnuplot file.

writeGnuSplot

public void writeGnuSplot()
Write the gnuplot file.

setNode

public void setNode(java.lang.String n)
Set the node name. Used in building the file names.
Parameters:
n - The node for this plot. Used to name the file.

setTitle

public void setTitle(java.lang.String t)
Set the overall plot title.
Parameters:
t - The overall graph title.

setXlabel

public void setXlabel(java.lang.String x)
Set the graph X label.
Parameters:
x - The X label for this graph.

setYlabel

public void setYlabel(java.lang.String y)
Set the graph Y label.
Parameters:
y - The Y label for this graph.

setZlabel

public void setZlabel(java.lang.String z)
Set the graph Z label.
Parameters:
z - The Z label for this graph.

setOutput

public void setOutput(java.lang.String o)
Set the output file name.
Parameters:
o - The output file for this graph.

setTerminal

public void setTerminal(java.lang.String t)
Set the terminal type for the gnuplot output.
Parameters:
t - The terminal type for this graph. Usually postscript.

setUsing

public void setUsing(java.lang.String u)
Set the "using" option within the gnu plot statement.
Parameters:
u - The format of the data in the datafile. Usually "%f %f".

setLineTitle

public void setLineTitle(java.lang.String lt)
Set the line title option within the gnu plot statement.
Parameters:
lt - The title of the line in the graph.

setWith

public void setWith(java.lang.String w)
Set the "with" option in the gnu plot command.
Parameters:
w - The type of line to draw. Usually "linespoints".

toString

public java.lang.String toString()
Returns the complete gnuplot filename and data filename.
Overrides:
toString in class java.lang.Object

plot

public void plot(java.lang.String value)
Record a plot value. Input string should be in the form of X Y, or X Y Z.
Parameters:
Object - The measured value to be recorded. Should be in form of X Y, or X Y Z.


Copyright © 2002 GE Corporate Research and Development. All Rights Reserved.