adams.core.gnuplot
Class SimplePlot

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.core.gnuplot.AbstractScriptlet
              extended by adams.core.gnuplot.AbstractPlotScriptlet
                  extended by adams.core.gnuplot.SimplePlot
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, SizeOfHandler, Serializable

public class SimplePlot
extends AbstractPlotScriptlet

For simple plots, like line plots.

Valid options are:

-D <int> (property: debugLevel)
    The greater the number the more additional info the scheme may output to
    the console (0 = off).
    default: 0
    minimum: 0
 
-data-file <adams.core.io.PlaceholderFile> (property: dataFile)
    The data file to use as basis for the plot.
    default: .
 
-cols <java.lang.String> (property: columns)
    The columns to use in the plot.
    default: 1:2
 
-plot-type <lines|points|linespoints|impulses|dots|steps|fsteps|histeps|errorbars|xerrorbars|yerrorbars|xyerrorbars|errorlines|xerrorlines|yerrorlines|xyerrorlines|boxes|filledcurves|boxerrorbars|boxxyerrorbars|financebars|candlesticks|vectors> (property: plotType)
    The plot type to use.
    default: LINES
 
-plot-name <java.lang.String> (property: plotName)
    The name to use for the plot in the key; gnuplot default is used if empty;
     use 'notitle' to suppress title.
    default:
 

Version:
$Revision: 4584 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Nested Class Summary
static class SimplePlot.PlotType
          Enumeration of available plot types.
 
Field Summary
protected  boolean m_FirstPlot
          whether the plot is the first plot.
protected  String m_PlotName
          the name of the plot.
protected  SimplePlot.PlotType m_PlotType
          the plot type to use.
static String NOTITLE
          the 'notitle' keyword.
 
Fields inherited from class adams.core.gnuplot.AbstractPlotScriptlet
m_Columns
 
Fields inherited from class adams.core.gnuplot.AbstractScriptlet
COMMENT, m_DataFile, m_LastError
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
SimplePlot()
           
 
Method Summary
 void defineOptions()
          Adds options to the internal list of options.
protected  String doGenerate()
          Generates the actual script code.
 String firstPlotTipText()
          Returns the tip text for this property.
 boolean getFirstPlot()
          Returns whether the plot is the first plot (because of "plot" or "replot" instruction).
 String getPlotName()
          Returns the name of the plot.
 SimplePlot.PlotType getPlotType()
          Returns the plot type in use.
 String globalInfo()
          Returns a string describing the object.
 String plotNameTipText()
          Returns the tip text for this property.
 String plotTypeTipText()
          Returns the tip text for this property.
 void setFirstPlot(boolean value)
          Sets whether the plot is the first plot or not (because of "plot" or "replot" instruction).
 void setPlotName(String value)
          Sets the name of the plot.
 void setPlotType(SimplePlot.PlotType value)
          Sets the plot type to use.
 
Methods inherited from class adams.core.gnuplot.AbstractPlotScriptlet
columnsTipText, getColumns, setColumns
 
Methods inherited from class adams.core.gnuplot.AbstractScriptlet
check, dataFileTipText, generate, getDataFile, getLastError, hasLastError, reset, setDataFile
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOTITLE

public static final String NOTITLE
the 'notitle' keyword.

See Also:
Constant Field Values

m_PlotType

protected SimplePlot.PlotType m_PlotType
the plot type to use.


m_PlotName

protected String m_PlotName
the name of the plot.


m_FirstPlot

protected boolean m_FirstPlot
whether the plot is the first plot.

Constructor Detail

SimplePlot

public SimplePlot()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class AbstractOptionHandler
Returns:
a description suitable for displaying in the gui

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractPlotScriptlet

setPlotType

public void setPlotType(SimplePlot.PlotType value)
Sets the plot type to use.

Parameters:
value - the type

getPlotType

public SimplePlot.PlotType getPlotType()
Returns the plot type in use.

Returns:
the type

plotTypeTipText

public String plotTypeTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

setPlotName

public void setPlotName(String value)
Sets the name of the plot.

Parameters:
value - the name

getPlotName

public String getPlotName()
Returns the name of the plot.

Returns:
the name

plotNameTipText

public String plotNameTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

setFirstPlot

public void setFirstPlot(boolean value)
Sets whether the plot is the first plot or not (because of "plot" or "replot" instruction).

Parameters:
value - if it is the first plot then use true

getFirstPlot

public boolean getFirstPlot()
Returns whether the plot is the first plot (because of "plot" or "replot" instruction).

Returns:
true if it is the first plot

firstPlotTipText

public String firstPlotTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

doGenerate

protected String doGenerate()
Generates the actual script code.

Specified by:
doGenerate in class AbstractScriptlet
Returns:
the script code, null in case of an error


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.