Package adams.core.gnuplot
Class SimplePlot
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.core.gnuplot.AbstractScriptlet
-
- adams.core.gnuplot.AbstractScriptletWithDataFile
-
- adams.core.gnuplot.AbstractPlotScriptlet
-
- adams.core.gnuplot.SimplePlot
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.ErrorProvider
,adams.core.GlobalInfoSupporter
,adams.core.io.AbsolutePathSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.QuickInfoSupporter
,adams.core.SizeOfHandler
,Serializable
public class SimplePlot extends AbstractPlotScriptlet
For simple plots, like line plots.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-data-file <adams.core.io.PlaceholderFile> (property: dataFile) The data file to use as basis for the plot. default: ${CWD}
-use-absolute-path <boolean> (property: useAbsolutePath) If enabled, the absolute path of the data file is used, otherwise just its name. default: true
-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|FINANCEBARDS|CANDELSTICKS|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:
-first-plot <boolean> (property: firstPlot) If enabled, the plot is assumed to be the first plot. default: false
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimplePlot.PlotType
Enumeration of available plot types.
-
Field Summary
Fields Modifier and Type Field Description 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.AbstractScriptletWithDataFile
m_DataFile, m_UseAbsolutePath
-
Fields inherited from class adams.core.gnuplot.AbstractScriptlet
COMMENT, m_LastError, m_Owner
-
-
Constructor Summary
Constructors Constructor Description SimplePlot()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.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.AbstractScriptletWithDataFile
check, dataFileTipText, getActualDataFile, getDataFile, getUseAbsolutePath, reset, setDataFile, setUseAbsolutePath, useAbsolutePathTipText
-
Methods inherited from class adams.core.gnuplot.AbstractScriptlet
generate, getLastError, getOwner, hasLastError, setOwner
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
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.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.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 interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractPlotScriptlet
-
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
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceadams.core.QuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractScriptlet
- Returns:
- null if no info available, otherwise short string
-
doGenerate
protected String doGenerate()
Generates the actual script code.- Specified by:
doGenerate
in classAbstractScriptlet
- Returns:
- the script code, null in case of an error
-
-