org.strbio.util.graph
Class PointColorPlot

java.lang.Object
  extended by org.strbio.util.graph.PointPlot
      extended by org.strbio.util.graph.PointColorPlot
All Implemented Interfaces:
Graphable2D, Graphable3D

public class PointColorPlot
extends PointPlot
implements Graphable3D

A graph that displays a point plot (a 2D graph of a bunch of points), with the 3rd axis in color.

  Version 1.0, 4/21/99 - original version.
  

Version:
1.0, 4/21/99
Author:
JMC

Field Summary
 
Fields inherited from class org.strbio.util.graph.PointPlot
legend, points, ptype
 
Constructor Summary
PointColorPlot(DVectorSet x, ColorScale cs)
          Start with just a set of points to plot.
 
Method Summary
 void createLegend()
          creates a new legend
 ColorScale getColorScale()
          Return the color scale being used.
 double maxZ()
          Returns the maximum z value currently being plotted.
 double minZ()
          Returns the minimum z value currently being plotted.
protected  void paintVectorAt(int x, int y, DVector v, java.awt.Graphics g)
          This is a function to put a dot wherever a point should be plotted.
 void rescale()
          Rescales, updates the legend.
 void setColorScale(ColorScale x)
          Set the color scale to use.
 void setLegend(ColorScaleLegend x)
          sets legend.
 void setPoints(DVectorSet x)
          Set the points being drawn.
 
Methods inherited from class org.strbio.util.graph.PointPlot
getLegend, getPoints, maxX, maxY, minX, minY, paintGraph, setLegend, setPointType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.strbio.util.graph.Graphable2D
getLegend, maxX, maxY, minX, minY, paintGraph
 

Constructor Detail

PointColorPlot

public PointColorPlot(DVectorSet x,
                      ColorScale cs)
Start with just a set of points to plot.

Method Detail

minZ

public double minZ()
Returns the minimum z value currently being plotted.

Specified by:
minZ in interface Graphable3D

maxZ

public double maxZ()
Returns the maximum z value currently being plotted.

Specified by:
maxZ in interface Graphable3D

rescale

public void rescale()
Rescales, updates the legend.


setPoints

public void setPoints(DVectorSet x)
Set the points being drawn. Does not make a copy of them.

Overrides:
setPoints in class PointPlot

setLegend

public void setLegend(ColorScaleLegend x)
sets legend.


createLegend

public void createLegend()
creates a new legend

Overrides:
createLegend in class PointPlot

getColorScale

public ColorScale getColorScale()
Return the color scale being used.


setColorScale

public void setColorScale(ColorScale x)
Set the color scale to use.


paintVectorAt

protected void paintVectorAt(int x,
                             int y,
                             DVector v,
                             java.awt.Graphics g)
This is a function to put a dot wherever a point should be plotted.

Overrides:
paintVectorAt in class PointPlot