org.omegahat.Graphics.Plots
Class DynamicHistogram
java.lang.Object
|
+--org.omegahat.Graphics.Primitives.GraphicalObject
|
+--org.omegahat.Graphics.Primitives.RGO
|
+--org.omegahat.Graphics.Primitives.GraphicalContainer
|
+--org.omegahat.Graphics.Plots.DataPlot
|
+--org.omegahat.Graphics.Plots.Histogram
|
+--org.omegahat.Graphics.Plots.DynamicHistogram
- All Implemented Interfaces:
- Addable, Copyable, GraphicalComponentInt, GraphicalContainerInt, MathOperable, ScaledComponentInt, SimpleGraphicalContainerInt, Subsettable, Tree
- public class DynamicHistogram
- extends Histogram
An incrementally updatable version of the basic
Histogram
to which one can add new values and have them added to
the appropriate bin and redraw just that bin.
Rescaling, etc. is ignore in this current implementation as there are a
variety of different possibilities.
| Fields inherited from class org.omegahat.Graphics.Primitives.RGO |
region |
| Methods inherited from class org.omegahat.Graphics.Plots.DataPlot |
bottomAxis, bottomAxis, createDataRegion, createDataRegion, createDataRegion, createRegionAllocator, dataRegion, getXAxis, getXLabel, getYAxis, getYLabel, leftAxis, leftAxis, make, setXAxis, setXLabel, setYAxis, setYLabel |
| Methods inherited from class org.omegahat.Graphics.Primitives.GraphicalContainer |
add, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addGraphicalObject, addValue, copy, copy, draw, drawChildren, get, getChild, getChildCount, getChildren, getDevice, getOrigin, getRegionAllocator, getXScale, getYScale, parent, parent, remove, removeGraphicalObject, removeGraphicalObject, setOrigin, setRegionAllocator, setXScale, setYScale, subset, subset, transform, transform |
| Methods inherited from class org.omegahat.Graphics.Primitives.RGO |
center, centre, createRegionDescription, createRegionDescription, getRegion, height, height, setHJust, setRegion, setVJust, width, width, x, x, y, y |
| Methods inherited from class org.omegahat.Graphics.Primitives.GraphicalObject |
cacheSize, getFontSize, getFontSize, getParameters, getParents, getStatus, isActive, isVisible, lastHeightCM, lastRegion, lastWidthCM, parents, setActive, setParameters, setParents, setVisible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
contents
protected HistogramContentsInt contents
DynamicHistogram
public DynamicHistogram(UnivariateSummary summary)
- Use the univariate summary to define the initial histogram.
DynamicHistogram
public DynamicHistogram(double[] data,
java.lang.String name)
- Use the data to define the histogram and the name as its name.
Works via the UnivariateSummary
class; in particular, note that the data will be sorted in place (copy it if you don't
want it overwritten).
DynamicHistogram
public DynamicHistogram(VariableInt v)
- Use the variable and its name to define the initial histogram.
Currently, the variable must in fact be an instance of the
RealVariable class
or a subclass.
In contrast to the constructor using a raw double array, this constructor copies
the data in the variable before constructing the histogram.
addValue
public HistogramBinInt addValue(double val)
makeBars
public int makeBars(HistogramContentsInt contents)
- Extends inherited method by caching the argument for future use.
- Overrides:
makeBars in class Histogram
identifyBin
public HistogramBinInt identifyBin(double value)
- Return the
HistogramBinInt
that contains the speicified X value.
getBar
public GraphicalComponentInt getBar(HistogramBinInt bin)
getContents
public HistogramContentsInt getContents()
- Accessor for
contents field
setContents
public HistogramContentsInt setContents(HistogramContentsInt value)
- Accessor for setting
contents field