com.rapidminer.gui.plotter
Interface Plotter

All Superinterfaces:
Renderable, Reportable
All Known Implementing Classes:
Abstract2DChartPlotter, AbstractPieChartPlotter, AndrewsCurves, BarChartPlotter, BlockChartPlotter, BoundDiagram, BoxPlot2D, BoxPlot3D, BubbleChartPlotter, ColorQuartileMatrixPlotter, ColorQuartilePlotter, DensityPlotter, DeviationChartPlotter, DistributionPlotter, GridVizPlotter, HintonDiagram, HistogramChart, HistogramColorChart, JMathPlotter, JMathPlotter2D, JMathPlotter3D, MultipleScatterPlotter, MultipleSeriesChartPlotter, ParallelPlotter, ParallelPlotter2, ParetoChartPlotter, PieChart2DPlotter, PieChart3DPlotter, PlotterAdapter, QuartilePlotter, RadVizPlotter, RingChartPlotter, ScatterMatrixPlotter, ScatterPlot3D, ScatterPlot3DColor, ScatterPlotter, ScatterPlotter2, SeriesChartPlotter, SimilarityKDistanceVisualization, SOMModelPlotter, SOMPlotter, SticksPlot2D, SticksPlot3D, SurfacePlot3D, SurveyPlotter

public interface Plotter
extends Renderable

An interface for all data available plotters. Plotters which implements this interface can be used together with a plotter panel which is automatically created and / or adapted.

Author:
Ingo Mierswa

Field Summary
static int MULTIPLE_SELECTION
          Indicates that multiple values can be selected by the user for a dimension.
static int NO_SELECTION
          Indicates that no plot values can be selected by the user.
static int SINGLE_SELECTION
          Indicates that only single values can be selected by the user for a dimension.
 
Method Summary
 void addMouseListener(java.awt.event.MouseListener listener)
          Adds a mouse listener to the plotter component.
 void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
          Adds a mouse motion listener to the plotter component.
 boolean canHandleContinousJittering()
          Indicates if the jittering can be handled continously.
 boolean canHandleJitter()
          Returns true if the plotter can handle jitter settings, i.e. a small random pertubation of data point positions.
 boolean canHandleZooming()
          Can handle zooming.
 void forcePlotGeneration()
          Forces the generation of a plotter which might be necessary for reporting plotters which are usually generated by user interaction.
 int getAxis(int axis)
          Returns the data dimension which is used for the given axis or -1 if no axis is used.
 java.lang.String getAxisName(int index)
          Returns a label for the axis with the given index, e.g.
 javax.swing.Icon getIcon(int index)
          Returns a small icon for the line type with the given index.
 java.lang.String getIdForPos(int x, int y)
          Returns the ID of the object under the mouse cursor if it has an id.
 int getInitialZoomFactor()
          Returns the initial zoom factor.
 int getNumberOfAxes()
          Returns the number of axes beside the value dimension, i. e. 1 for a 2D and 2 for a 3D plot.
 javax.swing.JComponent getOptionsComponent(int index)
          Returns the component of index index for interaction if plotter provides one.
 java.util.List<ParameterType> getParameterTypes()
          Returns the list of parameter types supported by this plotter for setting from outside.
 boolean getPlotColumn(int dimension)
          Returns true if the given dimension should be plotted.
 java.lang.String getPlotName()
          Returns the name of the plotting axe.
 javax.swing.JComponent getPlotter()
          Returns the plotter component.
 PlotterCondition getPlotterCondition()
          Returns the condition for data tables.
 java.lang.String getPlotterName()
          Returns the name of this plotter.
 java.awt.geom.Point2D getPositionInDataSpace(java.awt.Point p)
          Returns the given position in data space.
 int getValuePlotSelectionType()
          Returns the selection type for the value axis, i.e. one out of NO_SELECTION, SINGLE_SELECTION, or MULTIPLE_SELECTION.
 boolean hasOptionsDialog()
          Returns true if this plotter provides an options dialog.
 boolean hasSaveImageButton()
          Returns true, if plotter has capability to save an image on his own.
 boolean isProvidingCoordinates()
          Returns true, if plotter provides coordinates to show.
 boolean isSaveable()
          Indicates if the plotter can save the data.
 boolean isSupportingAbsoluteValues()
          Returns true if this plotter supports the usage of absolute values.
 boolean isSupportingLogScale(int axis)
          Returns true if a log scale for this column is supported.
 boolean isSupportingLogScaleForPlotColumns()
          Returns true if a log scale for this column is supported.
 boolean isSupportingSorting()
          Returns true if this plotter supports sorting for the selected plot dimension.
 void save()
          Should invoke the saving of the plotted data (file dialog,...).
 void setAbsolute(boolean absolute)
          Indicates if absolute data values should be used instead of the actual data.
 void setAxis(int plotterAxis, int dimension)
          Maps the given data dimension on the given plotterAxis.
 void setDataTable(DataTable dataTable)
          Sets the data table for this plotter.
 void setDragBounds(int x, int y, int w, int h)
          Sets the bounds of the dragging rectangle.
 void setDrawRange(double x, double y, double w, double h)
          Sets the drawing range in data space.
 void setJitter(int jitter)
          Sets the amount of Jitter and initiates a repaint.
 void setKey(java.lang.String key)
          Sets a key text (legend).
 void setLogScale(int axis, boolean logScale)
          Sets if the given axis should be plotted with log scale.
 void setLogScaleForPlotColumns(boolean logScale)
          Sets if the plot columns should be plotted with log scale.
 void setMousePosInDataSpace(int mouseX, int mouseY)
          Indicates where the mouse is in the plotter component.
 void setParameter(DataTable dataTable, java.lang.String key, java.lang.Object parameter)
          Sets the given parameter.
 void setPlotColumn(int dimension, boolean plot)
          Sets if the given data dimension should be plotted in the value dimension.
 void setSorting(boolean sorting)
          Indicates if the data should be sorted according to the currently selected plot dimension.
 void setZooming(int zooming)
          Reacts to zoom setting changed.
 void showOptionsDialog()
          Opens an options dialog.
 void stopUpdates(boolean value)
          Indicates if the plotter is currently under a process of value adjustments.
 
Methods inherited from interface com.rapidminer.report.Renderable
finishRendering, getRenderHeight, getRenderWidth, prepareRendering, render
 

Field Detail

NO_SELECTION

static final int NO_SELECTION
Indicates that no plot values can be selected by the user.

See Also:
Constant Field Values

SINGLE_SELECTION

static final int SINGLE_SELECTION
Indicates that only single values can be selected by the user for a dimension.

See Also:
Constant Field Values

MULTIPLE_SELECTION

static final int MULTIPLE_SELECTION
Indicates that multiple values can be selected by the user for a dimension.

See Also:
Constant Field Values
Method Detail

getPlotterName

java.lang.String getPlotterName()
Returns the name of this plotter.


setDataTable

void setDataTable(DataTable dataTable)
Sets the data table for this plotter.


getPlotter

javax.swing.JComponent getPlotter()
Returns the plotter component.


forcePlotGeneration

void forcePlotGeneration()
Forces the generation of a plotter which might be necessary for reporting plotters which are usually generated by user interaction. Plotter which are only generated by user interaction (for example the SOM plotter or the scatter plot matrix) should calculate the plot by overwriting this method.


stopUpdates

void stopUpdates(boolean value)
Indicates if the plotter is currently under a process of value adjustments. Might give implementing plotters a hint that graphical updates should not be performed until all settings are made.


getPlotterCondition

PlotterCondition getPlotterCondition()
Returns the condition for data tables. Plotters which are able to plot all data tables should not return null but BasicPlotterCondition.


getIcon

javax.swing.Icon getIcon(int index)
Returns a small icon for the line type with the given index. May return null.


getNumberOfAxes

int getNumberOfAxes()
Returns the number of axes beside the value dimension, i. e. 1 for a 2D and 2 for a 3D plot.


getAxisName

java.lang.String getAxisName(int index)
Returns a label for the axis with the given index, e.g. "x-Axis".


getValuePlotSelectionType

int getValuePlotSelectionType()
Returns the selection type for the value axis, i.e. one out of NO_SELECTION, SINGLE_SELECTION, or MULTIPLE_SELECTION.


canHandleJitter

boolean canHandleJitter()
Returns true if the plotter can handle jitter settings, i.e. a small random pertubation of data point positions.


canHandleContinousJittering

boolean canHandleContinousJittering()
Indicates if the jittering can be handled continously.


setJitter

void setJitter(int jitter)
Sets the amount of Jitter and initiates a repaint.


canHandleZooming

boolean canHandleZooming()
Can handle zooming.


setZooming

void setZooming(int zooming)
Reacts to zoom setting changed. The given value lies between 1 and 100. The initial value is 1.


getInitialZoomFactor

int getInitialZoomFactor()
Returns the initial zoom factor.


hasOptionsDialog

boolean hasOptionsDialog()
Returns true if this plotter provides an options dialog.


showOptionsDialog

void showOptionsDialog()
Opens an options dialog.


getOptionsComponent

javax.swing.JComponent getOptionsComponent(int index)
Returns the component of index index for interaction if plotter provides one. If no component with the index exists, it returns null


hasSaveImageButton

boolean hasSaveImageButton()
Returns true, if plotter has capability to save an image on his own. If false, RapidMiner will provide a Save Image button.


isProvidingCoordinates

boolean isProvidingCoordinates()
Returns true, if plotter provides coordinates to show. If returns false Label for coordinates will be removed


getPlotName

java.lang.String getPlotName()
Returns the name of the plotting axe. If returns null, default "Plots" should be used.


isSaveable

boolean isSaveable()
Indicates if the plotter can save the data.


save

void save()
Should invoke the saving of the plotted data (file dialog,...).


setAxis

void setAxis(int plotterAxis,
             int dimension)
Maps the given data dimension on the given plotterAxis.


getAxis

int getAxis(int axis)
Returns the data dimension which is used for the given axis or -1 if no axis is used.


setPlotColumn

void setPlotColumn(int dimension,
                   boolean plot)
Sets if the given data dimension should be plotted in the value dimension.


getPlotColumn

boolean getPlotColumn(int dimension)
Returns true if the given dimension should be plotted.


setMousePosInDataSpace

void setMousePosInDataSpace(int mouseX,
                            int mouseY)
Indicates where the mouse is in the plotter component.


getPositionInDataSpace

java.awt.geom.Point2D getPositionInDataSpace(java.awt.Point p)
Returns the given position in data space.


setDragBounds

void setDragBounds(int x,
                   int y,
                   int w,
                   int h)
Sets the bounds of the dragging rectangle.


setDrawRange

void setDrawRange(double x,
                  double y,
                  double w,
                  double h)
Sets the drawing range in data space.


getIdForPos

java.lang.String getIdForPos(int x,
                             int y)
Returns the ID of the object under the mouse cursor if it has an id. Otherwise null is returned.


addMouseMotionListener

void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
Adds a mouse motion listener to the plotter component.


addMouseListener

void addMouseListener(java.awt.event.MouseListener listener)
Adds a mouse listener to the plotter component.


setKey

void setKey(java.lang.String key)
Sets a key text (legend).


isSupportingLogScale

boolean isSupportingLogScale(int axis)
Returns true if a log scale for this column is supported.


isSupportingLogScaleForPlotColumns

boolean isSupportingLogScaleForPlotColumns()
Returns true if a log scale for this column is supported.


setLogScale

void setLogScale(int axis,
                 boolean logScale)
Sets if the given axis should be plotted with log scale.


setLogScaleForPlotColumns

void setLogScaleForPlotColumns(boolean logScale)
Sets if the plot columns should be plotted with log scale.


isSupportingSorting

boolean isSupportingSorting()
Returns true if this plotter supports sorting for the selected plot dimension.


setSorting

void setSorting(boolean sorting)
Indicates if the data should be sorted according to the currently selected plot dimension.


isSupportingAbsoluteValues

boolean isSupportingAbsoluteValues()
Returns true if this plotter supports the usage of absolute values.


setAbsolute

void setAbsolute(boolean absolute)
Indicates if absolute data values should be used instead of the actual data.


getParameterTypes

java.util.List<ParameterType> getParameterTypes()
Returns the list of parameter types supported by this plotter for setting from outside.


setParameter

void setParameter(DataTable dataTable,
                  java.lang.String key,
                  java.lang.Object parameter)
Sets the given parameter.



Copyright © 2001-2009 by Rapid-I