All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.gui.visualize.PlotData2D

java.lang.Object
    |
    +----weka.gui.visualize.PlotData2D

public class PlotData2D
extends java.lang.Object
This class is a container for plottable data. Instances form the primary data. An optional array of classifier/clusterer predictions (associated 1 for 1 with the instances) can also be provided.

Version:
$Revision: 1.12.2.1 $
Author:
Mark Hall (mhall@cs.waikato.ac.nz)

Variable Index

 o m_customColour
 
 o m_displayAllPoints
Display all points (ie.
 o m_useCustomColour
Custom colour for this plot

Constructor Index

 o PlotData2D(Instances)
Construct a new PlotData2D using the supplied instances

Method Index

 o addInstanceNumberAttribute()
Adds an instance number attribute to the plottable instances,
 o getCindex()
Get the currently set colouring index of the data
 o getPlotInstances()
Returns the instances for this plot
 o getPlotName()
Get the name of this plot
 o getXindex()
Get the currently set x index of the data
 o getYindex()
Get the currently set y index of the data
 o setCindex(int)
Set the colouring index of the data
 o setConnectPoints(boolean[])
Set whether consecutive points should be connected by lines
 o setConnectPoints(FastVector)
Set whether consecutive points should be connected by lines
 o setCustomColour(Color)
Set a custom colour to use for this plot.
 o setPlotName(String)
Set the name of this plot
 o setShapeSize(FastVector)
Set the shape sizes for the plot data
 o setShapeSize(int[])
Set the shape sizes for the plot data
 o setShapeType(FastVector)
Set the shape type for the plot data
 o setShapeType(int[])
Set the shape type for the plot data
 o setXindex(int)
Set the x index of the data.
 o setYindex(int)
Set the y index of the data

Field Detail

 o m_useCustomColour
public boolean m_useCustomColour
          Custom colour for this plot
 o m_customColour
public java.awt.Color m_customColour
 o m_displayAllPoints
public boolean m_displayAllPoints
          Display all points (ie. those that map to the same display coords)

Constructor Detail

 o PlotData2D
public PlotData2D(Instances insts)
          Construct a new PlotData2D using the supplied instances
Parameters:
insts - the instances to use.

Method Detail

 o addInstanceNumberAttribute
public void addInstanceNumberAttribute()
          Adds an instance number attribute to the plottable instances,
 o getPlotInstances
public Instances getPlotInstances()
          Returns the instances for this plot
Returns:
the instances for this plot
 o setPlotName
public void setPlotName(java.lang.String name)
          Set the name of this plot
Parameters:
name - the name for this plot
 o getPlotName
public java.lang.String getPlotName()
          Get the name of this plot
Returns:
the name of this plot
 o setShapeType
public void setShapeType(int st[]) throws java.lang.Exception
          Set the shape type for the plot data
Parameters:
st - an array of integers corresponding to shape types (see constants defined in Plot2D)
 o setShapeType
public void setShapeType(FastVector st) throws java.lang.Exception
          Set the shape type for the plot data
Parameters:
st - a FastVector of integers corresponding to shape types (see constants defined in Plot2D)
 o setShapeSize
public void setShapeSize(int ss[]) throws java.lang.Exception
          Set the shape sizes for the plot data
Parameters:
st - an array of integers specifying the size of data points
 o setShapeSize
public void setShapeSize(FastVector ss) throws java.lang.Exception
          Set the shape sizes for the plot data
Parameters:
st - a FastVector of integers specifying the size of data points
 o setConnectPoints
public void setConnectPoints(boolean cp[]) throws java.lang.Exception
          Set whether consecutive points should be connected by lines
Parameters:
cp - an array of boolean specifying which points should be connected to their preceeding neighbour.
 o setConnectPoints
public void setConnectPoints(FastVector cp) throws java.lang.Exception
          Set whether consecutive points should be connected by lines
Parameters:
cp - a FastVector of boolean specifying which points should be connected to their preceeding neighbour.
 o setCustomColour
public void setCustomColour(java.awt.Color c)
          Set a custom colour to use for this plot. This overides any data index to use for colouring. If null, then will revert back to the default (no custom colouring).
Parameters:
c - a custom colour to use for this plot or null (default---no colouring).
 o setXindex
public void setXindex(int x)
          Set the x index of the data.
Parameters:
x - the x index
 o setYindex
public void setYindex(int y)
          Set the y index of the data
Parameters:
y - the y index
 o setCindex
public void setCindex(int c)
          Set the colouring index of the data
Parameters:
c - the colouring index
 o getXindex
public int getXindex()
          Get the currently set x index of the data
Returns:
the current x index
 o getYindex
public int getYindex()
          Get the currently set y index of the data
Returns:
the current y index
 o getCindex
public int getCindex()
          Get the currently set colouring index of the data
Returns:
the current colouring index

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home