Class ScatterPlot
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,ColorProviderHandler
,Serializable
public class ScatterPlot extends AbstractXYChartGenerator
Generates a scatter plot by plotting the X column against one or more Y columns.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-width <int> (property: width) The width of the chart dialog. default: 800 minimum: -1
-height <int> (property: height) The height of the chart dialog. default: 600 minimum: -1
-row-finder <adams.data.spreadsheet.rowfinder.RowFinder> (property: rowFinder) The row finder to use for restricting the rows used for the chart. default: adams.data.spreadsheet.rowfinder.ByIndex
-x-column <java.lang.String> (property: XColumn) The index of the (optional) column which values to use on the X axis; if no column provided, the row index is used instead; An index is a number starting with 1; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last; numeric indices can be enforced by preceding them with '#' (eg '#12'); column names can be surrounded by double quotes. default:
-y-columns <java.lang.String> (property: YColumns) The range of columns to use on the Y axis; A range is a comma-separated list of single 1-based indices or sub-ranges of indices ('start-end'); ' inv(...)' inverts the range '...'; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last; numeric indices can be enforced by preceding them with '#' (eg '#12'); column names can be surrounded by double quotes. default:
-color-provider <adams.gui.visualization.core.AbstractColorProvider> (property: colorProvider) The color provider to use. default: adams.gui.visualization.core.DefaultColorProvider
-plot-type <CIRCLE|CROSS> (property: plotType) The plot type to use. default: CIRCLE
-diameter <int> (property: diameter) The diameter of the circle/cross in pixels (if no error data supplied). default: 7 minimum: 1
-overlay-paintlet <adams.gui.visualization.sequence.XYSequencePaintlet> (property: overlayPaintlet) The paintlet to use for painting the overlay data (if any). default: adams.gui.visualization.sequence.NullPaintlet
- 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
ScatterPlot.PlotType
The type of plot to use.
-
Field Summary
Fields Modifier and Type Field Description protected int
m_Diameter
the diameter.protected XYSequencePaintlet
m_OverlayPaintlet
the overlay paintlet to use for painting the overlays.protected ScatterPlot.PlotType
m_PlotType
the plot type.-
Fields inherited from class adams.gui.tools.spreadsheetviewer.chart.AbstractXYChartGenerator
m_ColorProvider, m_XColumn, m_YColumns
-
Fields inherited from class adams.gui.tools.spreadsheetviewer.chart.AbstractRowBasedChartGenerator
m_RowFinder
-
Fields inherited from class adams.gui.tools.spreadsheetviewer.chart.AbstractChartGenerator
m_Height, m_Width, STORAGE_NAME
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description ScatterPlot()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addChartGeneration(Flow flow, String name, SpreadSheet sheet)
Adds the chart generation to the flow.void
defineOptions()
Adds options to the internal list of options.String
diameterTipText()
Returns the tip text for this property.int
getDiameter()
Returns the diameter of the circle/cross.XYSequencePaintlet
getOverlayPaintlet()
Returns the overlay paintlet to use.ScatterPlot.PlotType
getPlotType()
Returns the plot type.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.String
globalInfo()
Returns a string describing the object.String
overlayPaintletTipText()
Returns the tip text for this property.String
plotTypeTipText()
Returns the tip text for this property.void
setDiameter(int value)
Sets the circle/cross diameter.void
setOverlayPaintlet(XYSequencePaintlet value)
Sets the overlay paintlet to use.void
setPlotType(ScatterPlot.PlotType value)
Sets the plot type.-
Methods inherited from class adams.gui.tools.spreadsheetviewer.chart.AbstractXYChartGenerator
check, colorProviderTipText, configureGenerator, configureSequencePlotter, getColorProvider, getXAxisLabel, getXColumn, getYAxisLabel, getYColumns, initialize, setColorProvider, setXColumn, setYColumns, XColumnTipText, YColumnsTipText
-
Methods inherited from class adams.gui.tools.spreadsheetviewer.chart.AbstractRowBasedChartGenerator
getRowFinder, rowFinderTipText, setRowFinder
-
Methods inherited from class adams.gui.tools.spreadsheetviewer.chart.AbstractChartGenerator
columnTypesToAxisType, columnTypesToTickGenerator, columnTypeToAxisType, columnTypeToTickGenerator, doGenerate, generate, getDefaultHeight, getDefaultWidth, getHeight, getWidth, heightTipText, setHeight, setWidth, widthTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_PlotType
protected ScatterPlot.PlotType m_PlotType
the plot type.
-
m_Diameter
protected int m_Diameter
the diameter.
-
m_OverlayPaintlet
protected XYSequencePaintlet m_OverlayPaintlet
the overlay paintlet to use for painting the overlays.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- 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 interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractXYChartGenerator
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractXYChartGenerator
- Returns:
- null if no info available, otherwise short string
-
setPlotType
public void setPlotType(ScatterPlot.PlotType value)
Sets the plot type.- Parameters:
value
- the type
-
getPlotType
public ScatterPlot.PlotType getPlotType()
Returns the plot type.- 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 GUI or for listing the options.
-
setDiameter
public void setDiameter(int value)
Sets the circle/cross diameter.- Parameters:
value
- the diameter
-
getDiameter
public int getDiameter()
Returns the diameter of the circle/cross.- Returns:
- the diameter
-
diameterTipText
public String diameterTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOverlayPaintlet
public void setOverlayPaintlet(XYSequencePaintlet value)
Sets the overlay paintlet to use.- Parameters:
value
- the paintlet
-
getOverlayPaintlet
public XYSequencePaintlet getOverlayPaintlet()
Returns the overlay paintlet to use.- Returns:
- the paintlet
-
overlayPaintletTipText
public String overlayPaintletTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
addChartGeneration
protected void addChartGeneration(Flow flow, String name, SpreadSheet sheet)
Adds the chart generation to the flow. The flow already contains forwarding of spreadsheet and selecting subset of rows.- Overrides:
addChartGeneration
in classAbstractRowBasedChartGenerator
- Parameters:
flow
- the flow to extendname
- the name of the tab/sheetsheet
- the spreadsheet to generate the flow for
-
-