Package org.faceless.graph2
Class BubbleSeries
- java.lang.Object
-
- org.faceless.graph2.Series
-
- 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
Constructors Constructor Description BubbleSeries(String name)
Create a new BubbleSeries
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
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 bubbley
- the Y co-ordinate of the center of the bubbleradius
- 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 bubbley
- the Y co-ordinate of the center of the bubblexradius
- the horizontal radius of the bubbleyradius
- the vertical radius of the bubblexrange
- half the length of the line going through the bubble horizontally. If 0 no horizontal line is drawnyrange
- 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 bubbley
- the Y co-ordinate of the center of the bubblestyle
- the style to use to draw the bubble
-
-