com.panayotis.gnuplot
Class GNUPlotParameters

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.String>
          extended by com.panayotis.gnuplot.PropertiesHolder
              extended by com.panayotis.gnuplot.GNUPlotParameters
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.String>

public class GNUPlotParameters
extends PropertiesHolder
implements java.io.Serializable

This is a placeholder for the parameters used to create the actual plot.

See Also:
Serialized Form

Field Summary
static java.lang.String ERROR_VAR
          The variable to use to store error status
static java.lang.String ERRORTAG
          Default error string to use while parsing gnuplot output
static java.lang.String NOERROR_COMMAND
          The command to use to check that the plot command executed without errors
 
Fields inherited from class com.panayotis.gnuplot.PropertiesHolder
NL
 
Constructor Summary
GNUPlotParameters()
          Create a new plot with the default parameters
GNUPlotParameters(boolean isGraph3D)
          Create a new plot with the default parameters
 
Method Summary
 void addGraph(Graph gr)
          Add a defined graph.
 void addPlot(Plot plot)
          Add a new plot to the default plot group.
 Axis getAxis(java.lang.String axisname)
          Get one of the available Axis from default Graph, in order to set some parameters on it.
 Page getPage()
          Retrieve the whole page object, defining the various graph plots
 java.util.ArrayList<Plot> getPlots()
          Get the list of the stored plots from default graph
 java.util.ArrayList<java.lang.String> getPostInit()
          This list is used to add special commands to gnuplot, after the automatically generated from this library.
 java.util.ArrayList<java.lang.String> getPreInit()
          This list is used to add special commands to gnuplot, before the automatically generated from this library.
 void newGraph()
          Add a new Graph object.
 void newGraph3D()
          Add a new Graph3D object.
 void setMultiTitle(java.lang.String title)
          Set the title of all graph objects, in multiplot environment.
 
Methods inherited from class com.panayotis.gnuplot.PropertiesHolder
appendProperties, set, set, unset
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

ERRORTAG

public static final java.lang.String ERRORTAG
Default error string to use while parsing gnuplot output

See Also:
Constant Field Values

ERROR_VAR

public static final java.lang.String ERROR_VAR
The variable to use to store error status

See Also:
Constant Field Values

NOERROR_COMMAND

public static final java.lang.String NOERROR_COMMAND
The command to use to check that the plot command executed without errors

See Also:
Constant Field Values
Constructor Detail

GNUPlotParameters

public GNUPlotParameters()
Create a new plot with the default parameters


GNUPlotParameters

public GNUPlotParameters(boolean isGraph3D)
Create a new plot with the default parameters

Parameters:
isGraph3D - Whether this plot is a Graph3D
Method Detail

getAxis

public Axis getAxis(java.lang.String axisname)
Get one of the available Axis from default Graph, in order to set some parameters on it.

Parameters:
axisname - The name of the Axis. It is usually "x", "y", "z"
Returns:
The desired Axis

getPreInit

public java.util.ArrayList<java.lang.String> getPreInit()
This list is used to add special commands to gnuplot, before the automatically generated from this library. It is a convenient method to send unsupported commands to gnuplot at the beginning of the program.

Returns:
The list of the initialization commands

getPostInit

public java.util.ArrayList<java.lang.String> getPostInit()
This list is used to add special commands to gnuplot, after the automatically generated from this library. It is a convenient method to send unsupported commands to gnuplot at the end of the program, just before the final plot command.

Returns:
he list of the post initialization commands

addPlot

public void addPlot(Plot plot)
Add a new plot to the default plot group. At least one plot is needed to produce visual results.

Parameters:
plot - The given plot.

newGraph

public void newGraph()
Add a new Graph object. This method is used to create a multiplot graph. Every "plot" command corresponds to a different Graph object. In order to draw to a new plot gnuplot object, create a new page.

See Also:
newGraph3D()

newGraph3D

public void newGraph3D()
Add a new Graph3D object. This method is used to create a multiplot graph. Every "splot" command corresponds to a different Graph object. In order to draw to a new plot gnuplot object, create a new page.

See Also:
newGraph()

addGraph

public void addGraph(Graph gr)
Add a defined graph.

Parameters:
gr - Graph object to be added
See Also:
newGraph()

setMultiTitle

public void setMultiTitle(java.lang.String title)
Set the title of all graph objects, in multiplot environment.

Parameters:
title - The title to use

getPage

public Page getPage()
Retrieve the whole page object, defining the various graph plots

Returns:
the Page object which holds all plots

getPlots

public java.util.ArrayList<Plot> getPlots()
Get the list of the stored plots from default graph

Returns:
List of Plot objects