Package moa.tasks
Class Plot
-
- All Implemented Interfaces:
Configurable
,Serializable
,MOAObject
,OptionHandler
,Task
public class Plot extends MainTask
A task allowing to create and plot gnuplot scripts.- Author:
- Dariusz Brzezinski
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Plot.LegendLocation
Location of the legend on the plot.static class
Plot.LegendType
Type of legend.static class
Plot.PlotStyle
static class
Plot.Terminal
Plot output terminal.
-
Field Summary
Fields Modifier and Type Field Description StringOption
additionalPlotOption
Additional plot options.StringOption
additionalSetOption
Addition pre-plot gunplot commands.FlagOption
deleteScriptsOption
Determines whether to delete gnuplot scripts after plotting.ListOption
fileAliasesOption
Comma separated list of aliases for the input *csv files.StringOption
gnuplotPathOption
Path to gunplot's binary directory, for example C:\Tools\Gnuplot\binary.ListOption
inputFilesOption
Comma separated list of input *csv files.MultiChoiceOption
legendLocationOption
Legend (key) location on the plot.MultiChoiceOption
legendTypeOption
Legend elements' alignment.IntOption
lineWidthOption
Plotted line width.MultiChoiceOption
outputTypeOption
Gnuplot terminal - postscript, png, pdf etc.FileOption
plotOutputOption
FileOption for selecting the plot output file.MultiChoiceOption
plotStyleOption
Type of plot - dots, points, lines ets.IntOption
pointIntervalOption
Interval between plotted data points.FlagOption
smoothOption
Determines whether to smooth the plot with bezier curves.IntOption
xColumnOption
Index of the csv column from which values for the x-axis should be taken.StringOption
xTitleOption
Title of the plots' x-axis.StringOption
xUnitOption
Units displayed next to x-axis values.IntOption
yColumnOption
Index of the csv column from which values for the y-axis should be taken.StringOption
yTitleOption
Title of the plots' y-axis.StringOption
yUnitOption
Units displayed next to y-axis values.-
Fields inherited from class moa.tasks.MainTask
INSTANCES_BETWEEN_MONITOR_UPDATES, outputFileOption
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description Plot()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
doMainTask(TaskMonitor monitor, ObjectRepository repository)
This method performs this task.String
getPurposeString()
Dictionary with option texts and objectsClass<?>
getTaskResultType()
Defines the task's result type.-
Methods inherited from class moa.tasks.MainTask
doTaskImpl
-
Methods inherited from class moa.tasks.AbstractTask
doTask, doTask, getDescription, getTaskName, prepareForUseImpl
-
Methods inherited from class moa.options.AbstractOptionHandler
copy, getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
-
Methods inherited from class moa.AbstractMOAObject
copy, measureByteSize, measureByteSize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface moa.MOAObject
measureByteSize
-
-
-
-
Field Detail
-
gnuplotPathOption
public StringOption gnuplotPathOption
Path to gunplot's binary directory, for example C:\Tools\Gnuplot\binary.
-
plotOutputOption
public FileOption plotOutputOption
FileOption for selecting the plot output file.
-
inputFilesOption
public ListOption inputFilesOption
Comma separated list of input *csv files. The file paths can be absolute or relative to the executing directory (moa.jar directory).
-
fileAliasesOption
public ListOption fileAliasesOption
Comma separated list of aliases for the input *csv files. If a legend is added to the plot, aliases will be presented in the legend.
-
outputTypeOption
public MultiChoiceOption outputTypeOption
Gnuplot terminal - postscript, png, pdf etc.
-
plotStyleOption
public MultiChoiceOption plotStyleOption
Type of plot - dots, points, lines ets.
-
xColumnOption
public IntOption xColumnOption
Index of the csv column from which values for the x-axis should be taken.
-
xTitleOption
public StringOption xTitleOption
Title of the plots' x-axis.
-
xUnitOption
public StringOption xUnitOption
Units displayed next to x-axis values.
-
yColumnOption
public IntOption yColumnOption
Index of the csv column from which values for the y-axis should be taken.
-
yTitleOption
public StringOption yTitleOption
Title of the plots' y-axis.
-
yUnitOption
public StringOption yUnitOption
Units displayed next to y-axis values.
-
lineWidthOption
public IntOption lineWidthOption
Plotted line width.
-
pointIntervalOption
public IntOption pointIntervalOption
Interval between plotted data points.
-
smoothOption
public FlagOption smoothOption
Determines whether to smooth the plot with bezier curves.
-
deleteScriptsOption
public FlagOption deleteScriptsOption
Determines whether to delete gnuplot scripts after plotting.
-
legendLocationOption
public MultiChoiceOption legendLocationOption
Legend (key) location on the plot.
-
legendTypeOption
public MultiChoiceOption legendTypeOption
Legend elements' alignment.
-
additionalSetOption
public StringOption additionalSetOption
Addition pre-plot gunplot commands. For example "set tics out" will change the default tic option and force outward facing tics. See the gnuplot manual for more commands.
-
additionalPlotOption
public StringOption additionalPlotOption
Additional plot options. For example \"[] [0:]\" will force the y-axis to start from 0. See the gnuplot manual for more options.
-
-
Method Detail
-
getPurposeString
public String getPurposeString()
Description copied from class:AbstractOptionHandler
Dictionary with option texts and objects- Specified by:
getPurposeString
in interfaceOptionHandler
- Overrides:
getPurposeString
in classAbstractOptionHandler
- Returns:
- the string with the purpose of this object
-
getTaskResultType
public Class<?> getTaskResultType()
Defines the task's result type.- Returns:
- a class object of the result of this task
-
doMainTask
protected Object doMainTask(TaskMonitor monitor, ObjectRepository repository)
Description copied from class:MainTask
This method performs this task.AbstractTask
implementsdoTask
, that usesdoTaskImpl
.MainTask
implementsdoTaskImpl
usingdoMainTask
so its extensions only need to implementdoMainTask
.- Specified by:
doMainTask
in classMainTask
- Parameters:
monitor
- the TaskMonitor to userepository
- the ObjectRepository to use- Returns:
- an object with the result of this task
-
-