|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttpp.TPPModel
tpp.ScatterPlotModel
public class ScatterPlotModel
A TPPModel with added members for allowing it to be presented and manipulated using via a Scatter Plot GUI
Field Summary |
---|
Fields inherited from class tpp.TPPModel |
---|
CLASS_UNKNOWN |
Constructor Summary | |
---|---|
ScatterPlotModel(int n)
|
Method Summary | |
---|---|
boolean |
areAxesSelected()
Are any axes selected? |
boolean |
canUndo()
Whether there is a snapshot to undo to. |
ScatterPlotModel |
clone()
|
void |
createSeries(Attribute indexAttribute,
Attribute idAttribute)
Create a series in the instances using the given index and id attributes (specified by name). |
Attribute |
createTestSet(int k)
Create a test set comprising 1/k'th of the instances. |
void |
drawRectangleAroundSelectedAxes()
Create a rectangle that includes all selected axes |
void |
drawRectangleAroundSelectedPoints()
Create a rectangle that includes all selected points |
int |
getAxisForAttribute(Attribute at)
Determine which axis represents the given attribute. |
Attribute |
getColourAttribute()
|
ColourScheme |
getColours()
Get teh color scheme |
Attribute |
getFillAttribute()
|
double |
getMarkerSize()
|
Attribute |
getSelectAttribute()
|
Attribute |
getShapeAttribute()
|
Attribute |
getSizeAttribute()
|
java.awt.geom.AffineTransform |
getTransform()
|
java.awt.geom.AffineTransform |
getTransform(double width,
double height)
Return a transform that will map data space onto device space of the given width and height, so that the points (and axes, if shown) fit snugly into the panel, adjusting the projection so that the scale of the transform is within reasonable limits. |
void |
initRectangle(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
Initialise a rectangle with corners at the given points |
boolean |
isAxisSelected(int a)
|
void |
loadGraph(Graph graph)
|
void |
moveSelectedAxes(double dx,
double dy)
Move the selected axes by the (dx,dy) |
double[] |
removeAttribute(Attribute at)
Remove an attribute, returning the values |
void |
removeAttributes(java.util.Vector<Attribute> attributes)
remove multiple attributes |
void |
removeGraph()
|
void |
removeSeries()
|
void |
resizePlot()
Rescale the scatter plot so that it fits into the existing window |
void |
resizePlot(int width,
int height)
Resize the scatter plot so that it fits in the new window size |
void |
selectAxes(int[] axes)
Add axes to the selection |
void |
selectAxesByRectangle()
Select any axes within the rectangle |
void |
selectAxis(int axis)
Add a axis to the selection |
void |
selectPointsByClassValue(java.lang.String value,
boolean addToExistingSelection)
Select the points whose value of the selection attribute is equal to the given value |
void |
selectPointsByNumericRange(double min,
double max,
boolean addToExistingSelection)
Select the points whose value of the selection attribute is in the given range. |
void |
selectPointsByRectangle()
Select any points within the rectangle |
void |
setColourAttribute(Attribute at)
|
void |
setColours(ColourScheme colours)
Set the color scheme |
void |
setFillAttribute(Attribute fillAttribute)
|
void |
setInstances(Instances data)
|
void |
setMarkerSize(double d)
|
void |
setSelectAttribute(Attribute selectAttribute)
|
void |
setShapeAttribute(Attribute shapeAttribute)
|
void |
setShowAxes(boolean b)
Whether to show axes |
void |
setShowAxisLabels(boolean showAxisLabels)
Whether or not to show axis labels. |
void |
setShowGraph(boolean show)
|
void |
setShowHierarchicalClustering(boolean show)
|
void |
setShowSeries(boolean show)
Show any series in the data |
void |
setShowTarget(boolean showTarget)
|
void |
setSizeAttribute(Attribute at)
|
boolean |
showAxes()
|
boolean |
showAxisLabels()
Whether or not to show axis labels. |
boolean |
showGraph()
|
boolean |
showHierarchicalClustering()
|
boolean |
showSeries()
|
boolean |
showTarget()
|
void |
undo()
Undo any changes back to the previous snapshot |
void |
unselectAxes()
Unselect the axes |
void |
unselectAxis(int i)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScatterPlotModel(int n)
Method Detail |
---|
public void setInstances(Instances data) throws java.lang.Exception
setInstances
in class TPPModel
java.lang.Exception
public void selectPointsByClassValue(java.lang.String value, boolean addToExistingSelection)
public void selectPointsByNumericRange(double min, double max, boolean addToExistingSelection)
public void unselectAxes()
public void selectAxis(int axis)
public void selectAxes(int[] axes)
public boolean areAxesSelected()
public boolean isAxisSelected(int a)
public void unselectAxis(int i)
public int getAxisForAttribute(Attribute at)
public void moveSelectedAxes(double dx, double dy)
public ColourScheme getColours()
public void setColours(ColourScheme colours)
public Attribute getShapeAttribute()
public Attribute getFillAttribute()
public Attribute getSelectAttribute()
public Attribute getColourAttribute()
public Attribute getSizeAttribute()
public void setSelectAttribute(Attribute selectAttribute)
public void setSizeAttribute(Attribute at)
public void setColourAttribute(Attribute at)
public void setShapeAttribute(Attribute shapeAttribute)
public void setFillAttribute(Attribute fillAttribute)
public void setMarkerSize(double d)
public double getMarkerSize()
public double[] removeAttribute(Attribute at)
removeAttribute
in class TPPModel
public void removeAttributes(java.util.Vector<Attribute> attributes)
public void initRectangle(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2)
public void drawRectangleAroundSelectedPoints()
public void drawRectangleAroundSelectedAxes()
public void selectPointsByRectangle()
public void selectAxesByRectangle()
public void setShowAxes(boolean b)
public boolean showAxes()
public boolean showAxisLabels()
public void setShowAxisLabels(boolean showAxisLabels)
public boolean showTarget()
public void setShowTarget(boolean showTarget)
public void createSeries(Attribute indexAttribute, Attribute idAttribute)
TPPModel
createSeries
in class TPPModel
public void removeSeries()
removeSeries
in class TPPModel
public boolean showSeries()
public void setShowSeries(boolean show)
public void loadGraph(Graph graph)
loadGraph
in class TPPModel
public void removeGraph()
removeGraph
in class TPPModel
public void setShowGraph(boolean show)
public boolean showGraph()
public void setShowHierarchicalClustering(boolean show)
public boolean showHierarchicalClustering()
public Attribute createTestSet(int k)
TPPModel
createTestSet
in class TPPModel
public void resizePlot(int width, int height)
public void resizePlot()
public java.awt.geom.AffineTransform getTransform(double width, double height)
public java.awt.geom.AffineTransform getTransform()
public ScatterPlotModel clone()
clone
in class TPPModel
public void undo()
public boolean canUndo()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |