MOA 12.03
Real Time Analytics for Data Streams
moa.tasks.Plot Class Reference

A task allowing to create and plot gnuplot scripts. More...

Inheritance diagram for moa.tasks.Plot:
Collaboration diagram for moa.tasks.Plot:

List of all members.

Public Types

enum  Terminal {
  CANVAS, EPSLATEX, GIF, JPEG,
  LATEX, PDFCAIRO, PNG, POSTSCRIPT,
  POSTSCRIPT_COLOR, PSLATEX, PSTEX, PSTRICKS,
  SVG
}
 Plot output terminal. More...
enum  LegendLocation {
  TOP_LEFT_INSIDE, TOP_CENTER_INSIDE, TOP_RIGHT_INSIDE, LEFT_INSIDE,
  CENTER_INSIDE, RIGHT_INSIDE, BOTTOM_LEFT_INSIDE, BOTTOM_CENTER_INSIDE,
  BOTTOM_RIGHT_INSIDE, TOP_LEFT_OUTSIDE, TOP_CENTER_OUTSIDE, TOP_RIGHT_OUTSIDE,
  LEFT_OUTSIDE, CENTER_OUTSIDE, RIGHT_OUTSIDE, BOTTOM_LEFT_OUTSIDE,
  BOTTOM_CENTER_OUTSIDE, BOTTOM_RIGHT_OUTSIDE
}
 Location of the legend on the plot. More...
enum  LegendType {
  NONE, BOX_VERTICAL, BOX_HORIZONTAL, NOBOX_VERTICAL,
  NOBOX_HORIZONTAL
}
 Type of legend. More...
enum  PlotStyle {
  LINES, POINTS, LINESPOINTS, IMPULSES,
  STEPS, FSTEPS, HISTEPS, DOTS
}

Public Member Functions

String getPurposeString ()
 Gets the purpose of this object.
Class<?> getTaskResultType ()
 Defines the task's result type.

Public Attributes

StringOption gnuplotPathOption
 Path to gunplot's binary directory, for example C:.
FileOption plotOutputOption
 FileOption for selecting the plot output file.
ListOption inputFilesOption
 Comma separated list of input *csv files.
ListOption fileAliasesOption
 Comma separated list of aliases for the input *csv files.
MultiChoiceOption outputTypeOption
 Gnuplot terminal - postscript, png, pdf etc.
MultiChoiceOption plotStyleOption
 Type of plot - dots, points, lines ets.
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.
IntOption lineWidthOption
 Plotted line width.
IntOption pointIntervalOption
 Interval between plotted data points.
FlagOption smoothOption
 Determines whether to smooth the plot with bezier curves.
FlagOption deleteScriptsOption
 Determines whether to delete gnuplot scripts after plotting.
MultiChoiceOption legendLocationOption
 Legend (key) location on the plot.
MultiChoiceOption legendTypeOption
 Legend elements' alignment.
StringOption additionalSetOption
 Addition pre-plot gunplot commands.
StringOption additionalPlotOption
 Additional plot options.

Protected Member Functions

Object doMainTask (TaskMonitor monitor, ObjectRepository repository)
 This method performs this task.

Detailed Description

A task allowing to create and plot gnuplot scripts.

Author:
Dariusz Brzezinski

Definition at line 43 of file Plot.java.


Member Enumeration Documentation

Location of the legend on the plot.

Author:
Dariusz Brzezi�ski
Enumerator:
TOP_LEFT_INSIDE 
TOP_CENTER_INSIDE 
TOP_RIGHT_INSIDE 
LEFT_INSIDE 
CENTER_INSIDE 
RIGHT_INSIDE 
BOTTOM_LEFT_INSIDE 
BOTTOM_CENTER_INSIDE 
BOTTOM_RIGHT_INSIDE 
TOP_LEFT_OUTSIDE 
TOP_CENTER_OUTSIDE 
TOP_RIGHT_OUTSIDE 
LEFT_OUTSIDE 
CENTER_OUTSIDE 
RIGHT_OUTSIDE 
BOTTOM_LEFT_OUTSIDE 
BOTTOM_CENTER_OUTSIDE 
BOTTOM_RIGHT_OUTSIDE 

Definition at line 260 of file Plot.java.

Type of legend.

Author:
Dariusz Brzezi�ski
Enumerator:
NONE 
BOX_VERTICAL 
BOX_HORIZONTAL 
NOBOX_VERTICAL 
NOBOX_HORIZONTAL 

Definition at line 299 of file Plot.java.

Enumerator:
LINES 
POINTS 
LINESPOINTS 
IMPULSES 
STEPS 
FSTEPS 
HISTEPS 
DOTS 

Definition at line 333 of file Plot.java.

Plot output terminal.

Author:
Dariusz Brzezi�ski
Enumerator:
CANVAS 
EPSLATEX 
GIF 
JPEG 
LATEX 
PDFCAIRO 
PNG 
POSTSCRIPT 
POSTSCRIPT_COLOR 
PSLATEX 
PSTEX 
PSTRICKS 
SVG 

Definition at line 213 of file Plot.java.


Member Function Documentation

Object moa.tasks.Plot.doMainTask ( TaskMonitor  monitor,
ObjectRepository  repository 
) [protected, virtual]

This method performs this task.

AbstractTask implements doTask, that uses doTaskImpl. MainTask implements doTaskImpl using doMainTask so its extensions only need to implement doMainTask.

Parameters:
monitorthe TaskMonitor to use
repositorythe ObjectRepository to use
Returns:
an object with the result of this task

Implements moa.tasks.MainTask.

Definition at line 378 of file Plot.java.

Here is the call graph for this function:

String moa.tasks.Plot.getPurposeString ( )

Gets the purpose of this object.

Returns:
the string with the purpose of this object

Reimplemented from moa.options.AbstractOptionHandler.

Definition at line 45 of file Plot.java.

Class<?> moa.tasks.Plot.getTaskResultType ( )

Defines the task's result type.

Implements moa.tasks.Task.

Definition at line 373 of file Plot.java.


Member Data Documentation

Initial value:
 new StringOption(
            "additionalPlotOptions",
            'z',
            "Additional options that should be added to the gnuplot script in the plot statement. For example \"[] [0:]\" will force the y-axis to start from 0. See the gnuplot manual for more options.",
            " ")

Additional plot options.

For example "[] [0:]" will force the y-axis to start from 0. See the gnuplot manual for more options.

Definition at line 202 of file Plot.java.

Initial value:
 new StringOption(
            "additionalCommands",
            'c',
            "Additional commands that should be added to the gnuplot script before the plot command. For example \"set tics out\" will change the default tic option and force outward facing tics. See the gnuplot manual for more commands.",
            " ")

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.

Definition at line 192 of file Plot.java.

Initial value:
 new FlagOption("deleteScripts",
            'd', "Determines whether to delete gnuplot scripts after plotting.")

Determines whether to delete gnuplot scripts after plotting.

Definition at line 169 of file Plot.java.

Referenced by moa.tasks.Plot.doMainTask().

Initial value:
 new ListOption(
            "aliases",
            'a',
            "Aliases for files stated in the inputFiles parameter. Aliases will be presented in the plot's legend.",
            new StringOption("alias", ' ', "File alias.", "MyAlg"),
            new StringOption[] { new StringOption("", ' ', "", "OZABag"),
                    new StringOption("", ' ', "", "HOT"),
                    new StringOption("", ' ', "", "AWE") }, ',')

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.

Definition at line 82 of file Plot.java.

Referenced by moa.tasks.Plot.doMainTask().

Initial value:
 new StringOption("gnuplotPath", 'e',
            "Directory of the gnuplot executable. For example \"C:\\Tools\\Gnuplot\\binary\".", "")

Path to gunplot's binary directory, for example C:.

Definition at line 54 of file Plot.java.

Referenced by moa.tasks.Plot.doMainTask().

Initial value:
 new ListOption(
            "inputFiles",
            'i',
            "File names or file paths of csv inputs. Values should be seperated by commas.",
            new StringOption("inputFile", ' ', "Input file.", "algorithm.csv"),
            new StringOption[] {
                    new StringOption("", ' ', "", "algorithm1.csv"),
                    new StringOption("", ' ', "", "algorithm2.csv"),
                    new StringOption("", ' ', "", "algorithm3.csv") }, ',')

Comma separated list of input *csv files.

The file paths can be absolute or relative to the executing directory (moa.jar directory).

Definition at line 68 of file Plot.java.

Referenced by moa.tasks.Plot.doMainTask().

Initial value:
 new MultiChoiceOption(
            "legendLocation", 'l', "Legend (key) location on the plot.",
            LegendLocation.getStringValues(), LegendLocation.getDescriptions(),
            8)

Legend (key) location on the plot.

Definition at line 175 of file Plot.java.

Initial value:
 new MultiChoiceOption(
            "legendType", 'k', "Legend elements' alignment.", LegendType
                    .getStringValues(), LegendType.getDescriptions(), 1)

Legend elements' alignment.

Definition at line 183 of file Plot.java.

Initial value:
 new IntOption("lineWidth", 'w',
            "Determines the thickness of plotted lines", 2)

Plotted line width.

Definition at line 150 of file Plot.java.

Initial value:
 new MultiChoiceOption(
            "outputType", 't', "Gnuplot output terminal.", Terminal
                    .getStringValues(), Terminal.getDescriptions(), 8)

Gnuplot terminal - postscript, png, pdf etc.

Definition at line 94 of file Plot.java.

Initial value:
 new FileOption("plotOutputFile", 'r',
            "File with the result plot (image).", null, "eps", true)

FileOption for selecting the plot output file.

Definition at line 61 of file Plot.java.

Referenced by moa.tasks.Plot.doMainTask().

Initial value:
 new MultiChoiceOption(
            "plotStyle", 'p', "Plot style.", PlotStyle.getStringValues(),
            PlotStyle.getDescriptions(), 2)

Type of plot - dots, points, lines ets.

Definition at line 101 of file Plot.java.

Initial value:
 new IntOption(
            "pointInterval",
            'v',
            "Determines the inteval between plotted data points. Used for LINESPOINTS plots only.",
            0, 0, Integer.MAX_VALUE)

Interval between plotted data points.

Definition at line 156 of file Plot.java.

Initial value:
 new FlagOption("smooth", 's',
            "Determines whether to smooth the plot with bezier curves.")

Determines whether to smooth the plot with bezier curves.

Definition at line 164 of file Plot.java.

Initial value:
 new IntOption(
            "xColumn",
            'x',
            "Index of the csv column from which values for the x-axis should be taken.",
            1)

Index of the csv column from which values for the x-axis should be taken.

Definition at line 108 of file Plot.java.

Initial value:
 new StringOption("xTitle", 'm',
            "Title of the plots' x-axis.", "Processed instances")

Title of the plots' x-axis.

Definition at line 117 of file Plot.java.

Initial value:
 new StringOption("xUnit", 'g',
            "Units displayed next to x-axis values.", "")

Units displayed next to x-axis values.

Definition at line 123 of file Plot.java.

Initial value:
 new IntOption(
            "yColumn",
            'y',
            "Index of the column from which values for the y-axis should be taken",
            9)

Index of the csv column from which values for the y-axis should be taken.

Definition at line 129 of file Plot.java.

Initial value:
 new StringOption("yTitle", 'n',
            "Title of the plots' y-axis.", "Accuracy")

Title of the plots' y-axis.

Definition at line 138 of file Plot.java.

Initial value:
 new StringOption("yUnit", 'u',
            "Units displayed next to y-axis values.", "%")

Units displayed next to y-axis values.

Definition at line 144 of file Plot.java.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations