weka.gui.visualize
Class Plot2D

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byweka.gui.visualize.Plot2D
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class Plot2D
extends javax.swing.JPanel

This class plots datasets in two dimensions. It can also plot classifier errors and clusterer predictions.

Version:
$Revision: 1.20 $
Author:
Mark Hall (mhall@cs.waikato.ac.nz)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int CONST_AUTOMATIC_SHAPE
           
static int DEFAULT_SHAPE_SIZE
           
static int DIAMOND_SHAPE
           
static int ERROR_SHAPE
           
protected  boolean m_axisChanged
          if the user changes attribute assigned to an axis
protected  java.awt.Color m_axisColour
          Default colour for the axis
protected  int m_axisPad
          Axis padding
protected  java.awt.Color m_backgroundColour
          Default colour for the plot background
protected  int m_cIndex
           
protected  FastVector m_colorList
          The list of the colors used
protected  java.awt.Color[] m_DefaultColors
          default colours for colouring discrete class
protected  int[][] m_drawnPoints
          An array used to show if a point is hidden or not.
protected  javax.swing.JFrame m_InstanceInfo
          For popping up text info on data points
protected  javax.swing.JTextArea m_InstanceInfoText
           
protected  int m_JitterVal
          the level of jitter
protected  java.util.Random m_JRand
          random values for perterbing the data points
protected  java.awt.Font m_labelFont
          Font for labels
protected  java.awt.FontMetrics m_labelMetrics
           
protected  java.lang.String m_masterName
          The name of the master plot
protected  PlotData2D m_masterPlot
          The master plot
protected  double m_maxC
           
protected  double m_maxX
          Holds the min and max values of the x, y and colouring attributes over all plots
protected  double m_maxY
           
protected  double m_minC
           
protected  double m_minX
           
protected  double m_minY
           
protected  Plot2DCompanion m_plotCompanion
          An optional "compainion" of the panel.
protected  Instances m_plotInstances
          The instances to be plotted
protected  boolean m_plotResize
          if the user resizes the window, or the attributes selected for the attributes change, then the lookup table for points needs to be recalculated
protected  FastVector m_plots
          The plots to display
protected  double[][] m_pointLookup
          lookup table for plotted points
protected  int m_sIndex
           
protected  int m_tickSize
          Tick size
protected  int m_XaxisEnd
           
protected  int m_XaxisStart
          the offsets of the axes once label metrics are calculated
protected  int m_xIndex
          Indexes of the attributes to go on the x and y axis and the attribute to use for colouring and the current shape for drawing
protected  int m_YaxisEnd
           
protected  int m_YaxisStart
           
protected  int m_yIndex
           
static int MAX_SHAPES
           
static int MISSING_SHAPE
           
static int PLUS_SHAPE
           
static int TRIANGLEDOWN_SHAPE
           
static int TRIANGLEUP_SHAPE
           
static int X_SHAPE
           
 
Fields inherited from class javax.swing.JPanel
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Plot2D()
          Constructor
 
Method Summary
 void addPlot(PlotData2D newPlot)
          Add a plot to the list of plots to display
private  boolean checkPoints(double x1, double y1)
          This will check the values of the screen points passed and make sure that they land on the screen
 double convertToAttribX(double scx)
          convert a Panel x coordinate to a raw x value.
 double convertToAttribY(double scy)
          convert a Panel y coordinate to a raw y value.
 double convertToPanelX(double xval)
          Convert an raw x value to Panel x coordinate.
 double convertToPanelY(double yval)
          Convert an raw y value to Panel y coordinate.
 void determineBounds()
          Determine the min and max values for axis and colouring attributes
protected static void drawDataPoint(double x, double y, double xprev, double yprev, int size, int shape, java.awt.Graphics gx)
          Draws a data point at a given set of panel coordinates at a given size and connects a line to the previous point.
protected static void drawDataPoint(double x, double y, int size, int shape, java.awt.Graphics gx)
          Draws a data point at a given set of panel coordinates at a given size.
private static void drawDiamond(java.awt.Graphics gx, double x, double y, int size)
          Draws a diamond.
private static void drawPlus(java.awt.Graphics gx, double x, double y, int size)
          Draws a plus.
private static void drawTriangleDown(java.awt.Graphics gx, double x, double y, int size)
          Draws an triangle (point at bottom).
private static void drawTriangleUp(java.awt.Graphics gx, double x, double y, int size)
          Draws an triangle (point at top).
private static void drawX(java.awt.Graphics gx, double x, double y, int size)
          Draws an X.
private  void extendColourMap(int highest)
          Add more colours to the colour map
private  void fillLookup()
          Fills the lookup caches for the plots.
 PlotData2D getMasterPlot()
          Get the master plot
 double getMaxC()
          Return the current max value of the colouring attribute
 double getMaxX()
          Return the current max value of the attribute plotted on the x axis
 double getMaxY()
          Return the current max value of the attribute plotted on the y axis
 double getMinC()
          Return the current min value of the colouring attribute
 double getMinX()
          Return the current min value of the attribute plotted on the x axis
 double getMinY()
          Return the current min value of the attribute plotted on the y axis
 FastVector getPlots()
          Return the list of plots
static void main(java.lang.String[] args)
          Main method for testing this class
private  void paintAxis(java.awt.Graphics gx)
          Draws the axis and a spectrum if the colouring attribute is numeric
 void paintComponent(java.awt.Graphics gx)
          Renders this component
private  void paintData(java.awt.Graphics gx)
          Draws the data points and predictions (if provided).
(package private)  int pturbX(double xvalP, double xj)
          returns a value by which an x value can be peturbed.
(package private)  int pturbY(double yvalP, double yj)
          returns a value by which a y value can be peturbed.
 void removeAllPlots()
          Clears all plots
 void searchPoints(int x, int y, boolean newFrame)
          Pops up a window displaying attribute information on any instances at a point+-plotting_point_size (in panel coordinates)
 void setCindex(int c)
          Set the index of the attribute to use for colouring
 void setColours(FastVector cols)
          Set a list of colours to use when colouring points according to class values or cluster numbers
private  void setFonts(java.awt.Graphics gx)
          Set up fonts and font metrics
 void setInstances(Instances inst)
          Sets the master plot from a set of instances
 void setJitter(int j)
          Set level of jitter and repaint the plot using the new jitter value
 void setMasterPlot(PlotData2D master)
          Set the master plot.
 void setPlotCompanion(Plot2DCompanion p)
          Set a companion class.
private  void setProperties()
          Set the properties for Plot2D
 void setXindex(int x)
          Set the index of the attribute to go on the x axis
 void setYindex(int y)
          Set the index of the attribute to go on the y axis
private  void updatePturb()
          Updates the perturbed values for the plots when the jitter value is changed
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_SHAPES

public static final int MAX_SHAPES
See Also:
Constant Field Values

ERROR_SHAPE

public static final int ERROR_SHAPE
See Also:
Constant Field Values

MISSING_SHAPE

public static final int MISSING_SHAPE
See Also:
Constant Field Values

CONST_AUTOMATIC_SHAPE

public static final int CONST_AUTOMATIC_SHAPE
See Also:
Constant Field Values

X_SHAPE

public static final int X_SHAPE
See Also:
Constant Field Values

PLUS_SHAPE

public static final int PLUS_SHAPE
See Also:
Constant Field Values

DIAMOND_SHAPE

public static final int DIAMOND_SHAPE
See Also:
Constant Field Values

TRIANGLEUP_SHAPE

public static final int TRIANGLEUP_SHAPE
See Also:
Constant Field Values

TRIANGLEDOWN_SHAPE

public static final int TRIANGLEDOWN_SHAPE
See Also:
Constant Field Values

DEFAULT_SHAPE_SIZE

public static final int DEFAULT_SHAPE_SIZE
See Also:
Constant Field Values

m_axisColour

protected java.awt.Color m_axisColour
Default colour for the axis


m_backgroundColour

protected java.awt.Color m_backgroundColour
Default colour for the plot background


m_plots

protected FastVector m_plots
The plots to display


m_masterPlot

protected PlotData2D m_masterPlot
The master plot


m_masterName

protected java.lang.String m_masterName
The name of the master plot


m_plotInstances

protected Instances m_plotInstances
The instances to be plotted


m_plotCompanion

protected Plot2DCompanion m_plotCompanion
An optional "compainion" of the panel. If specified, this class will get to do its thing with our graphics context before we do any drawing. Eg. the visualize panel may need to draw polygons etc. before we draw plot axis and data points


m_InstanceInfo

protected javax.swing.JFrame m_InstanceInfo
For popping up text info on data points


m_InstanceInfoText

protected javax.swing.JTextArea m_InstanceInfoText

m_colorList

protected FastVector m_colorList
The list of the colors used


m_DefaultColors

protected java.awt.Color[] m_DefaultColors
default colours for colouring discrete class


m_xIndex

protected int m_xIndex
Indexes of the attributes to go on the x and y axis and the attribute to use for colouring and the current shape for drawing


m_yIndex

protected int m_yIndex

m_cIndex

protected int m_cIndex

m_sIndex

protected int m_sIndex

m_maxX

protected double m_maxX
Holds the min and max values of the x, y and colouring attributes over all plots


m_minX

protected double m_minX

m_maxY

protected double m_maxY

m_minY

protected double m_minY

m_maxC

protected double m_maxC

m_minC

protected double m_minC

m_axisPad

protected final int m_axisPad
Axis padding

See Also:
Constant Field Values

m_tickSize

protected final int m_tickSize
Tick size

See Also:
Constant Field Values

m_XaxisStart

protected int m_XaxisStart
the offsets of the axes once label metrics are calculated


m_YaxisStart

protected int m_YaxisStart

m_XaxisEnd

protected int m_XaxisEnd

m_YaxisEnd

protected int m_YaxisEnd

m_plotResize

protected boolean m_plotResize
if the user resizes the window, or the attributes selected for the attributes change, then the lookup table for points needs to be recalculated


m_axisChanged

protected boolean m_axisChanged
if the user changes attribute assigned to an axis


m_drawnPoints

protected int[][] m_drawnPoints
An array used to show if a point is hidden or not. This is used for speeding up the drawing of the plot panel although I am not sure how much performance this grants over not having it.


m_labelFont

protected java.awt.Font m_labelFont
Font for labels


m_labelMetrics

protected java.awt.FontMetrics m_labelMetrics

m_JitterVal

protected int m_JitterVal
the level of jitter


m_JRand

protected java.util.Random m_JRand
random values for perterbing the data points


m_pointLookup

protected double[][] m_pointLookup
lookup table for plotted points

Constructor Detail

Plot2D

public Plot2D()
Constructor

Method Detail

setProperties

private void setProperties()
Set the properties for Plot2D


checkPoints

private boolean checkPoints(double x1,
                            double y1)
This will check the values of the screen points passed and make sure that they land on the screen

Parameters:
x1 - The x coord.
y1 - The y coord.

setPlotCompanion

public void setPlotCompanion(Plot2DCompanion p)
Set a companion class. This is a class that might want to render something on the plot before we do our thing. Eg, Malcolm's shape drawing stuff needs to happen before we plot axis and points

Parameters:
p - a companion class

setJitter

public void setJitter(int j)
Set level of jitter and repaint the plot using the new jitter value

Parameters:
j - the level of jitter

setColours

public void setColours(FastVector cols)
Set a list of colours to use when colouring points according to class values or cluster numbers

Parameters:
cols - the list of colours to use

setXindex

public void setXindex(int x)
Set the index of the attribute to go on the x axis

Parameters:
x - the index of the attribute to use on the x axis

setYindex

public void setYindex(int y)
Set the index of the attribute to go on the y axis

Parameters:
y - the index of the attribute to use on the y axis

setCindex

public void setCindex(int c)
Set the index of the attribute to use for colouring

Parameters:
c - the index of the attribute to use for colouring

getPlots

public FastVector getPlots()
Return the list of plots

Returns:
the list of plots

getMasterPlot

public PlotData2D getMasterPlot()
Get the master plot

Returns:
the master plot

getMaxX

public double getMaxX()
Return the current max value of the attribute plotted on the x axis

Returns:
the max x value

getMaxY

public double getMaxY()
Return the current max value of the attribute plotted on the y axis

Returns:
the max y value

getMinX

public double getMinX()
Return the current min value of the attribute plotted on the x axis

Returns:
the min x value

getMinY

public double getMinY()
Return the current min value of the attribute plotted on the y axis

Returns:
the min y value

getMaxC

public double getMaxC()
Return the current max value of the colouring attribute

Returns:
the max colour value

getMinC

public double getMinC()
Return the current min value of the colouring attribute

Returns:
the min colour value

setInstances

public void setInstances(Instances inst)
                  throws java.lang.Exception
Sets the master plot from a set of instances

Parameters:
inst - the instances
Throws:
exception - Exception if instances could not be set
java.lang.Exception

setMasterPlot

public void setMasterPlot(PlotData2D master)
                   throws java.lang.Exception
Set the master plot.

Parameters:
master - the plot to make the master plot
Throws:
java.lang.Exception - if the plot could not be set.

removeAllPlots

public void removeAllPlots()
Clears all plots


addPlot

public void addPlot(PlotData2D newPlot)
             throws java.lang.Exception
Add a plot to the list of plots to display

Parameters:
newPlot - the new plot to add
Throws:
java.lang.Exception - if the plot could not be added

setFonts

private void setFonts(java.awt.Graphics gx)
Set up fonts and font metrics

Parameters:
gx - the graphics context

searchPoints

public void searchPoints(int x,
                         int y,
                         boolean newFrame)
Pops up a window displaying attribute information on any instances at a point+-plotting_point_size (in panel coordinates)

Parameters:
x - the x value of the clicked point
y - the y value of the clicked point
newFrame - true if instance info is to be displayed in a new frame.

determineBounds

public void determineBounds()
Determine the min and max values for axis and colouring attributes


convertToAttribX

public double convertToAttribX(double scx)
convert a Panel x coordinate to a raw x value.

Parameters:
scx - The Panel x coordinate
Returns:
A raw x value.

convertToAttribY

public double convertToAttribY(double scy)
convert a Panel y coordinate to a raw y value.

Parameters:
scy - The Panel y coordinate
Returns:
A raw y value.

pturbX

int pturbX(double xvalP,
           double xj)
returns a value by which an x value can be peturbed. Makes sure that the x value+pturb stays within the plot bounds

Parameters:
xvalP - the x coordinate to be peturbed
xj - a random number to use in calculating a peturb value
Returns:
a peturb value

convertToPanelX

public double convertToPanelX(double xval)
Convert an raw x value to Panel x coordinate.

Parameters:
xval - the raw x value
Returns:
an x value for plotting in the panel.

pturbY

int pturbY(double yvalP,
           double yj)
returns a value by which a y value can be peturbed. Makes sure that the y value+pturb stays within the plot bounds

Parameters:
yvalP - the y coordinate to be peturbed
yj - a random number to use in calculating a peturb value
Returns:
a peturb value

convertToPanelY

public double convertToPanelY(double yval)
Convert an raw y value to Panel y coordinate.

Parameters:
yval - the raw y value
Returns:
an y value for plotting in the panel.

drawX

private static void drawX(java.awt.Graphics gx,
                          double x,
                          double y,
                          int size)
Draws an X.

Parameters:
gx - the graphics context
x - the x coord
y - the y coord
size - the size of the shape

drawPlus

private static void drawPlus(java.awt.Graphics gx,
                             double x,
                             double y,
                             int size)
Draws a plus.

Parameters:
gx - the graphics context
x - the x coord
y - the y coord
size - the size of the shape

drawDiamond

private static void drawDiamond(java.awt.Graphics gx,
                                double x,
                                double y,
                                int size)
Draws a diamond.

Parameters:
gx - the graphics context
x - the x coord
y - the y coord
size - the size of the shape

drawTriangleUp

private static void drawTriangleUp(java.awt.Graphics gx,
                                   double x,
                                   double y,
                                   int size)
Draws an triangle (point at top).

Parameters:
gx - the graphics context
x - the x coord
y - the y coord
size - the size of the shape

drawTriangleDown

private static void drawTriangleDown(java.awt.Graphics gx,
                                     double x,
                                     double y,
                                     int size)
Draws an triangle (point at bottom).

Parameters:
gx - the graphics context
x - the x coord
y - the y coord
size - the size of the shape

drawDataPoint

protected static void drawDataPoint(double x,
                                    double y,
                                    double xprev,
                                    double yprev,
                                    int size,
                                    int shape,
                                    java.awt.Graphics gx)
Draws a data point at a given set of panel coordinates at a given size and connects a line to the previous point.

Parameters:
x - the x coord
y - the y coord
xprev - the x coord of the previous point
yprev - the y coord of the previous point
size - the size of the point
shape - the shape of the data point (square is reserved for nominal error data points). Shapes: 0=x, 1=plus, 2=diamond, 3=triangle(up), 4 = triangle (down).
gx - the graphics context

drawDataPoint

protected static void drawDataPoint(double x,
                                    double y,
                                    int size,
                                    int shape,
                                    java.awt.Graphics gx)
Draws a data point at a given set of panel coordinates at a given size.

Parameters:
x - the x coord
y - the y coord
size - the size of the point
shape - the shape of the data point (square is reserved for nominal error data points). Shapes: 0=x, 1=plus, 2=diamond, 3=triangle(up), 4 = triangle (down).
gx - the graphics context

updatePturb

private void updatePturb()
Updates the perturbed values for the plots when the jitter value is changed


fillLookup

private void fillLookup()
Fills the lookup caches for the plots. Also calculates errors for numeric predictions (if any) in plots


paintData

private void paintData(java.awt.Graphics gx)
Draws the data points and predictions (if provided).

Parameters:
gx - the graphics context

paintAxis

private void paintAxis(java.awt.Graphics gx)
Draws the axis and a spectrum if the colouring attribute is numeric

Parameters:
gx - the graphics context

extendColourMap

private void extendColourMap(int highest)
Add more colours to the colour map


paintComponent

public void paintComponent(java.awt.Graphics gx)
Renders this component

Parameters:
gx - the graphics context

main

public static void main(java.lang.String[] args)
Main method for testing this class

Parameters:
args - arguments