com.panayotis.gnuplot
Class JavaPlot

java.lang.Object
  extended by com.panayotis.gnuplot.GNUPlot
      extended by com.panayotis.gnuplot.JavaPlot

public class JavaPlot
extends GNUPlot

A friendly wrapper of GNUPlot, able to set common plot parameters. If easy of use is required, it is recommended to use this class instead of GNUPlot. *

This object is not serializable, use GNUPlotParameters instead.


Nested Class Summary
static class JavaPlot.Key
           
 
Constructor Summary
JavaPlot()
          Create a new instance of JavaPlot, with the default parameters
JavaPlot(boolean isGraph3D)
          Create a new instance of JavaPlot, using the default parameters.
JavaPlot(GNUPlotParameters par)
          Create a new JavaPlot object with given parameters
JavaPlot(GNUPlotParameters par, java.lang.String gnuplotpath, GNUPlotTerminal term)
          Create a new JavaPlot object with given parameters, gnuplot path and terminal
JavaPlot(GNUPlotParameters par, java.lang.String gnuplotpath, GNUPlotTerminal term, boolean isGraph3D)
          Create a new JavaPlot object with given parameters, gnuplot path terminal ans isGraph3D
JavaPlot(java.lang.String gnuplotpath)
          Create a new JavaPlot object with a given gnuplot path
JavaPlot(java.lang.String gnuplotpath, boolean isGraph3D)
          Create a new instance of gnuplot, with a given path for gnuplot.
 
Method Summary
 void addPlot(DataSet set)
           
 void addPlot(double[][] points)
           
 void addPlot(float[][] points)
           
 void addPlot(int[][] points)
           
 void addPlot(long[][] points)
           
 void addPlot(java.lang.String function)
           
 void setKey(JavaPlot.Key position)
           
 void setTitle(java.lang.String title)
          Set the graph Title
 
Methods inherited from class com.panayotis.gnuplot.GNUPlot
addGraph, addPlot, getAxis, getCommands, getDebugger, getGNUPlotPath, getLayout, getPage, getParameters, getPlots, getPostInit, getPreInit, getTerminal, newGraph, newGraph3D, plot, set, setGNUPlotPath, setMultiTitle, setParameters, setPersist, setTerminal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaPlot

public JavaPlot()
         throws GNUPlotException
Create a new instance of JavaPlot, with the default parameters

Throws:
GNUPlotException - If the gnuplot executable is not found, this exception is thrown. Typically at this case there is need to use a constructor which defines the gnuplot path.
See Also:
GNUPlot.GNUPlot()

JavaPlot

public JavaPlot(boolean isGraph3D)
         throws GNUPlotException
Create a new instance of JavaPlot, using the default parameters. Use this method if you want to specifically define that the default plot is Graph3D

Parameters:
isGraph3D - true if the default plot is Graph3D
Throws:
GNUPlotException - If the gnuplot executable is not found, this exception is thrown. Typically at this case there is need to use a constructor which defines the gnuplot path.
See Also:
GNUPlot.GNUPlot(boolean)

JavaPlot

public JavaPlot(java.lang.String gnuplotpath)
         throws GNUPlotException
Create a new JavaPlot object with a given gnuplot path

Parameters:
gnuplotpath -
Throws:
GNUPlotException - If the gnuplot executable is not found, this exception is thrown. It means that the provided path for gnuplot is not valid.
See Also:
GNUPlot.GNUPlot(String)

JavaPlot

public JavaPlot(java.lang.String gnuplotpath,
                boolean isGraph3D)
         throws GNUPlotException
Create a new instance of gnuplot, with a given path for gnuplot. This constructor is useful if the automatic path search for gnuplot is not fruitful, or the user wants to point to a specific gnuplot executable.

Parameters:
gnuplotpath - The pathname of the gnuplot executable. If this parameter is set to null, use the default path.
isGraph3D - true if the default plot is Graph3D
Throws:
GNUPlotException - If the gnuplot executable is not found, this exception is thrown. It means that the provided path for gnuplot is not valid.
See Also:
GNUPlot.GNUPlot(String,boolean)

JavaPlot

public JavaPlot(GNUPlotParameters par)
         throws GNUPlotException
Create a new JavaPlot object with given parameters

Parameters:
par -
Throws:
GNUPlotException
See Also:
GNUPlot.GNUPlot(GNUPlotParameters)

JavaPlot

public JavaPlot(GNUPlotParameters par,
                java.lang.String gnuplotpath,
                GNUPlotTerminal term)
         throws GNUPlotException
Create a new JavaPlot object with given parameters, gnuplot path and terminal

Parameters:
par -
gnuplotpath -
term -
Throws:
GNUPlotException
See Also:
GNUPlot.GNUPlot(GNUPlotParameters,String,GNUPlotTerminal)

JavaPlot

public JavaPlot(GNUPlotParameters par,
                java.lang.String gnuplotpath,
                GNUPlotTerminal term,
                boolean isGraph3D)
         throws GNUPlotException
Create a new JavaPlot object with given parameters, gnuplot path terminal ans isGraph3D

Parameters:
par -
gnuplotpath -
term -
isGraph3D -
Throws:
GNUPlotException
See Also:
GNUPlot.GNUPlot(GNUPlotParameters,String,GNUPlotTerminal,boolean)
Method Detail

setTitle

public void setTitle(java.lang.String title)
Set the graph Title

Parameters:
title - Title of the graph

setKey

public void setKey(JavaPlot.Key position)
Parameters:
position -

addPlot

public void addPlot(double[][] points)
Parameters:
points -

addPlot

public void addPlot(float[][] points)
Parameters:
points -

addPlot

public void addPlot(int[][] points)
Parameters:
points -

addPlot

public void addPlot(long[][] points)
Parameters:
points -

addPlot

public void addPlot(java.lang.String function)
Parameters:
function -

addPlot

public void addPlot(DataSet set)
Parameters:
set -