Class 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
    • Field Detail

      • 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 interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.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 interface adams.core.option.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
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.
        Specified by:
        getQuickInfo in interface adams.core.QuickInfoSupporter
        Overrides:
        getQuickInfo in class AbstractScriptlet
        Returns:
        null if no info available, otherwise short string
      • 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