org.faceless.graph2
Class BubbleSeries

java.lang.Object
  extended by org.faceless.graph2.Series
      extended by org.faceless.graph2.BubbleSeries

public class BubbleSeries
extends Series

A Bubble Series can be used to plot round or elliptical "bubbles" on a graph. Bubbles are always flat, even when viewed in 3D. At their simplest, a bubble is simply that - an ellipse with a center point, width and height. It's also possible to add "range bars" to a bubble, which draws a "+" through the center of the bubble as well. This is typically used for showing both the range and the standard deviation of a sample series - the length of the arms showing the maximum value, the edge of the bubble showing the SD.


Constructor Summary
BubbleSeries(String name)
          Create a new BubbleSeries
 
Method Summary
 void set(double x, double y, double radius)
          Add a simple, circular bubble to the graph.
 void set(double x, double y, double xradius, double yradius, double xrange, double yrange)
          Add an elliptic bubble to the graph with "range" markers.
 void setStyle(double x, double y, Style style)
          Set the style for the bubble at this position.
 
Methods inherited from class org.faceless.graph2.Series
addBox, addLine, addMarker, getName, outputToSeries, outputToSeriesFunction, setStyle, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BubbleSeries

public BubbleSeries(String name)
Create a new BubbleSeries

Parameters:
name - the name of the series
Method Detail

set

public void set(double x,
                double y,
                double radius)
Add a simple, circular bubble to the graph.

Parameters:
x - the X co-ordinate of the center of the bubble
y - the Y co-ordinate of the center of the bubble
radius - the radius of the bubble

set

public void set(double x,
                double y,
                double xradius,
                double yradius,
                double xrange,
                double yrange)
Add an elliptic bubble to the graph with "range" markers. Bubbles like this are commonly used to show the mean, standard deviation and maximum of a sample in two dimensions (the mean being the (x,y) position, the standard deviation the size of the bubble, and the maximum values being the extent of the lines.

Parameters:
x - the X co-ordinate of the center of the bubble
y - the Y co-ordinate of the center of the bubble
xradius - the horizontal radius of the bubble
yradius - the vertical radius of the bubble
xrange - half the length of the line going through the bubble horizontally. If 0 no horizontal line is drawn
yrange - half the length of the line going through the bubble vertically. If 0 no vertical line is drawn

setStyle

public void setStyle(double x,
                     double y,
                     Style style)
Set the style for the bubble at this position.

Parameters:
x - the X co-ordinate of the center of the bubble
y - the Y co-ordinate of the center of the bubble
style - the style to use to draw the bubble


Copyright © 2001-2011 Big Faceless Organization