public class Dendrogram extends Data
AXIS_X_TOP, AXIS_Y_RIGHT, BAR_TYPE_HORIZONTAL, BAR_TYPE_VERTICAL, DASH_PATTERN_DASH, DASH_PATTERN_DASH_DOT, DASH_PATTERN_DOT, DASH_PATTERN_SOLID, DATA_TYPE_FILL, DATA_TYPE_LINE, DATA_TYPE_MARKER, DATA_TYPE_PICTURE, DATA_TYPE_TUBE, DENDROGRAM_TYPE_HORIZONTAL, DENDROGRAM_TYPE_VERTICAL, FILL_TYPE_GRADIENT, FILL_TYPE_NONE, FILL_TYPE_PAINT, FILL_TYPE_SOLID, LABEL_TYPE_PERCENT, MARKER_TYPE_ASTERISK, MARKER_TYPE_CIRCLE_CIRCLE, MARKER_TYPE_CIRCLE_PLUS, MARKER_TYPE_CIRCLE_X, MARKER_TYPE_DIAMOND_PLUS, MARKER_TYPE_FILLED_CIRCLE, MARKER_TYPE_FILLED_DIAMOND, MARKER_TYPE_FILLED_SQUARE, MARKER_TYPE_FILLED_TRIANGLE, MARKER_TYPE_HOLLOW_CIRCLE, MARKER_TYPE_HOLLOW_DIAMOND, MARKER_TYPE_HOLLOW_SQUARE, MARKER_TYPE_HOLLOW_TRIANGLE, MARKER_TYPE_OCTAGON_PLUS, MARKER_TYPE_OCTAGON_X, MARKER_TYPE_PLUS, MARKER_TYPE_SQUARE_PLUS, MARKER_TYPE_SQUARE_X, MARKER_TYPE_X, TEXT_X_CENTER, TEXT_X_LEFT, TEXT_X_RIGHT, TEXT_Y_BOTTOM, TEXT_Y_CENTER, TEXT_Y_TOP
AUTOSCALE_DATA, AUTOSCALE_DENSITY, AUTOSCALE_NUMBER, AUTOSCALE_OFF, AUTOSCALE_WINDOW, AXIS_X, AXIS_Y, AXIS_Z, LABEL_TYPE_NONE, LABEL_TYPE_TITLE, LABEL_TYPE_X, LABEL_TYPE_Y, LABEL_TYPE_Z, TRANSFORM_CUSTOM, TRANSFORM_LINEAR, TRANSFORM_LOG
Constructor and Description |
---|
Dendrogram(AxisXY axis,
ClusterHierarchical clusterHierarchical)
Constructs a vertical dendrogram chart using supplied ClusterHierarchical object.
|
Dendrogram(AxisXY axis,
ClusterHierarchical clusterHierarchical,
int type)
Constructs a dendrogram chart using supplied ClusterHierarchical object.
|
Dendrogram(AxisXY axis,
double[] clusterLevel,
int[] leftSons,
int[] rightSons)
Constructs a vertical dendrogram chart using supplied data.
|
Dendrogram(AxisXY axis,
double[] clusterLevel,
int[] leftSons,
int[] rightSons,
int type)
Constructs a dendrogram chart using supplied data.
|
Modifier and Type | Method and Description |
---|---|
void |
dataRange(double[] range)
Update the data range,
range = {xmin,xmax,ymin,ymax} . |
double[][] |
getCoordinates()
Convenience routine to get the "Coordinates" attribute.
|
int[] |
getLeftSons()
Convenience routine to get the "LeftSons" attribute.
|
double[] |
getLevels()
Convenience routine to get the "Levels" attribute.
|
int[] |
getOrder()
Convenience routine to get the "Order" attribute.
|
int[] |
getRightSons()
Convenience routine to get the "RightSons" attribute.
|
void |
paint(Draw draw)
Paints this node and all of its children.
|
void |
setCoordinates(double[][] value)
Convenience routine to set the "Coordinates" attribute.
|
void |
setLabels(String[] labels)
Sets up the axis labels for dendrogram plot.
|
void |
setLeftSons(int[] value)
Convenience routine to set the "LeftSons" attribute.
|
void |
setLevels(double[] value)
Convenience routine to set the "Levels" attribute.
|
void |
setLineColor(Color[] colors)
Define colors for individual clusters.
|
void |
setLineColor(String[] colors)
Define colors for individual clusters.
|
void |
setOrder(int[] value)
Convenience routine to set the "Order" attribute.
|
void |
setRightSons(int[] value)
Convenience routine to set the "RightSons" attribute.
|
formatLabel
addPickListener, firePickListeners, getALT, getAxis, getBackground, getBarGap, getBarType, getBarWidth, getChart, getChartTitle, getChildren, getClipData, getComponent, getConcatenatedViewport, getDataType, getDoubleBuffering, getExplode, getFillOutlineColor, getFillOutlineType, getFillPaint, getFillType, getGradient, getHREF, getLegend, getLineDashPattern, getMarkerDashPattern, getMarkerThickness, getMarkerType, getParent, getReference, getScreenAxis, getScreenSize, getScreenViewport, getSize, getSkipWeekends, getTextAngle, getTextColor, getTitle, getToolTip, getViewport, isBitSet, prePaint, removePickListener, setALT, setBarGap, setBarType, setBarWidth, setChartTitle, setClipData, setCustomTransform, setDataType, setDoubleBuffering, setExplode, setFillOutlineColor, setFillOutlineColor, setFillOutlineType, setFillPaint, setFillPaint, setFillPaint, setFillType, setGradient, setGradient, setGradient, setHREF, setImage, setLineDashPattern, setMarkerDashPattern, setMarkerThickness, setMarkerType, setReference, setScreenSize, setSize, setSkipWeekends, setTextAngle, setTextColor, setTextColor, setTitle, setTitle, setToolTip, setViewport, setViewport
clone, clone, clone, clone, getAbstractParent, getAttribute, getAutoscaleInput, getAutoscaleMinimumTimeInterval, getAutoscaleOutput, getBooleanAttribute, getChildList, getColorAttribute, getCustomTransform, getDensity, getDoubleAttribute, getFillColor, getFont, getFontName, getFontSize, getFontStyle, getImage, getIntegerAttribute, getLabelType, getLightColor, getLineColor, getLineWidth, getLocale, getMarkerColor, getMarkerSize, getName, getNumber, getPaint, getStringAttribute, getTextFormat, getTickLength, getTransform, getX, getY, isAncestorOf, isAttributeSet, isAttributeSetAtThisNode, parseColor, remove, setAttribute, setAutoscaleInput, setAutoscaleMinimumTimeInterval, setAutoscaleOutput, setDensity, setFillColor, setFillColor, setFont, setFontName, setFontSize, setFontStyle, setImage, setLabelType, setLightColor, setLightColor, setLineColor, setLineColor, setLineWidth, setLocale, setMarkerColor, setMarkerColor, setMarkerSize, setName, setNumber, setPaint, setTextFormat, setTextFormat, setTickLength, setTransform, setX, setY, toString
public Dendrogram(AxisXY axis, ClusterHierarchical clusterHierarchical)
axis
- the AxisXY
parent of this nodeclusterHierarchical
- a ClusterHierarchical
objectpublic Dendrogram(AxisXY axis, ClusterHierarchical clusterHierarchical, int type)
axis
- the AxisXY
parent of this nodeclusterHierarchical
- a ClusterHierarchical
objecttype
- an int
which specifies the DendrogramType.
Legal values are DENDROGRAM_TYPE_VERTICAL
or
DENDROGRAM_TYPE_HORIZONTAL
.ChartNode.DENDROGRAM_TYPE_VERTICAL
,
ChartNode.DENDROGRAM_TYPE_HORIZONTAL
public Dendrogram(AxisXY axis, double[] clusterLevel, int[] leftSons, int[] rightSons)
axis
- the AxisXY
parent of this nodeclusterLevel
- a double
array which contains the levels
at which the clusters are joinedleftSons
- an int
array which contains the left sons
of each merged clusterrightSons
- an int
array which contains the right sons
of each merged clusterpublic Dendrogram(AxisXY axis, double[] clusterLevel, int[] leftSons, int[] rightSons, int type)
axis
- the AxisXY
parent of this nodeclusterLevel
- a double
array which contains the levels
at which the clusters are joinedleftSons
- an int
array which contains the left sons
of each merged clusterrightSons
- an int
array which contains the right sons
of each merged clustertype
- an int
which specifies the DendrogramType.
Legal values are DENDROGRAM_TYPE_VERTICAL
or
DENDROGRAM_TYPE_HORIZONTAL
.ChartNode.DENDROGRAM_TYPE_VERTICAL
,
ChartNode.DENDROGRAM_TYPE_HORIZONTAL
public void dataRange(double[] range)
range = {xmin,xmax,ymin,ymax}
.
The entries in range are updated to reflect the extent of
the data in this node.
The argument range
is an input/output variable. Its value should be
updated only if the data in this node is outside the range
already in the array.public double[][] getCoordinates()
double
[][] array of coordinates.public int[] getLeftSons()
int
array of left sons.public double[] getLevels()
double
array of cluster levels.public int[] getOrder()
int
array of the order of clusters
as they appear in the dendrogram.public int[] getRightSons()
int
array of right sons.public void paint(Draw draw)
public void setCoordinates(double[][] value)
value
- a double
[][] array of coordinates.public void setLabels(String[] labels)
Note that user-defined labels will be re-ordered to match the order of the clusters displayed in the plot.
labels
- a String
array with which
to label the axis. The number of labels
must equal the number of items.public void setLeftSons(int[] value)
value
- an int
array of left sons.public void setLevels(double[] value)
value
- a double
array of cluster levels.public void setLineColor(Color[] colors)
ChartNode.setLineColor(java.awt.Color color)
. This
method will color N clusters, where N is the number of elements in the
colors[] array.colors
- a Color
array which contains each color
to use for the subclusters.public void setLineColor(String[] colors)
ChartNode.setLineColor(String color)
. This
method will color N clusters, where N is the number of elements in the
colors[] array.colors
- a String
array which contains each color
to use for the subclusters.public void setOrder(int[] value)
value
- an int
array of the order of clusters
as they appear in the dendrogram.public void setRightSons(int[] value)
value
- an int
array of right sons.Copyright © 1970-2015 Rogue Wave Software
Built October 13 2015.