edu.ull.cgunay.plots
Class GNUPlot

java.lang.Object
  |
  +--edu.ull.cgunay.plots.Grapher
        |
        +--edu.ull.cgunay.plots.GNUPlot

public class GNUPlot
extends Grapher

Grapher implementation for plotting with the gnuplot program.

See description in Grapher for the usage.

Created: Mon Apr 8 17:53:58 2002

Modified: $Date: 2002/12/17 00:58:53 $

Version:
$Revision: 1.9 $ for this file.
Author:
Cengiz Gunay
See Also:
Grapher

Nested Class Summary
 
Nested classes inherited from class edu.ull.cgunay.plots.Grapher
Grapher.Axis, Grapher.Data, Grapher.DataType, Grapher.ErrorData, Grapher.MultiAxes, Grapher.PreciseProfileData, Grapher.ProfileData, Grapher.VerticalBar
 
Field Summary
 
Fields inherited from class edu.ull.cgunay.plots.Grapher
dataTypes, err, msg, out, points, process, windowNumber
 
Constructor Summary
GNUPlot()
          Creates a new GNUPlot instance.
 
Method Summary
 void close()
          Exits from gnuplot.
 String def_func(String name, String[] params, String body)
          gnuplot style function definition.
(package private)  String getLabel(Plot plot)
           
 PlotHandle multiPlot(Collection plots, PrintStream out)
          Not implemented yet!
 String plotToString(Plot plot)
          Deprecated. See MatLab
 String plotToString(SpikePlot plot)
          Returns a String representation of a spike plot for the Grapher.
 void setWindow(int windowNumber)
          Sets the current plot window according to grapher platform.
 void writeEPS(PlotHandle handle, String filename)
          Sets terminal type to postscript eps and directs the output to given filename.
 
Methods inherited from class edu.ull.cgunay.plots.Grapher
add, assign, command, createAxis, createMultiAxes, createMultiAxes, display, div, exp, func, geq, getPoints, mul, multiPlot, neg, paren, plotToString, plotToStringAlt, profile, quote, range, response, setPoints, sub, superposedPlot, superposedPlot, variable, waitForResponse, writeEPSbw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GNUPlot

public GNUPlot()
        throws GrapherNotAvailableException
Creates a new GNUPlot instance.

Throws:
GrapherNotAvailableException - if the cannot instantiate the grapher process
Method Detail

plotToString

public String plotToString(SpikePlot plot)
Description copied from class: Grapher
Returns a String representation of a spike plot for the Grapher.

Specified by:
plotToString in class Grapher
Parameters:
plot - a SpikePlot value
Returns:
a String value

plotToString

public String plotToString(Plot plot)
Deprecated. See MatLab

gnuplot specific plotting command, calls plot.body().

Parameters:
plot - a Plot value
Returns:
a String value
See Also:
MatLab.plotToStringAlt(edu.ull.cgunay.plots.Plot)

getLabel

String getLabel(Plot plot)

multiPlot

public PlotHandle multiPlot(Collection plots,
                            PrintStream out)
Not implemented yet!

Specified by:
multiPlot in class Grapher
Parameters:
plots - a Collection value
out - a PrintStream value
Returns:
a String value
See Also:
multiPlot(java.util.Collection, java.io.PrintStream), MatLab.multiPlot(java.util.Collection, java.io.PrintStream)

def_func

public String def_func(String name,
                       String[] params,
                       String body)
gnuplot style function definition.

Specified by:
def_func in class Grapher
Parameters:
name - a String value, name of the function
params - a String[] value, parameter names of the function
body - a String value, the body of the function
Returns:
a String value

close

public void close()
Exits from gnuplot.

Overrides:
close in class Grapher

setWindow

public void setWindow(int windowNumber)
Description copied from class: Grapher
Sets the current plot window according to grapher platform.

Specified by:
setWindow in class Grapher
Parameters:
windowNumber - an int value

writeEPS

public void writeEPS(PlotHandle handle,
                     String filename)
Sets terminal type to postscript eps and directs the output to given filename.

Specified by:
writeEPS in class Grapher
Parameters:
handle - a PlotHandle value
filename - a String value