Class XYCurveVisualization
- java.lang.Object
-
- elki.visualization.visualizers.visunproj.XYCurveVisualization
-
- All Implemented Interfaces:
VisualizationProcessor
,VisFactory
public class XYCurveVisualization extends java.lang.Object implements VisFactory
Visualizer to render a simple 2D curve such as a ROC curve.- Since:
- 0.3
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
CSS_AXIS_LABEL
Axis labelsprivate static java.lang.String
NAME
Name for this visualizer.private static java.lang.String
SERIESID
SVG class name for plot line
-
Constructor Summary
Constructors Constructor Description XYCurveVisualization()
Constructor, Parameterizable style - does nothing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowThumbnails(VisualizationTask task)
Test whether to do a thumbnail or a full rendering.private void
clipDraw(SVGPath path, XYCurve curve, double preX, double preY, double x, double y, LinearScale scalex, LinearScale scaley, double sizex, double sizey)
Clipped drawing function for an edge.Visualization
makeVisualization(VisualizerContext context, VisualizationTask task, VisualizationPlot plot, double width, double height, Projection proj)
Produce a visualization instance for the given taskvoid
processNewResult(VisualizerContext context, java.lang.Object start)
Add visualizers for the given result (tree) to the context.private void
setupCSS(VisualizerContext context, SVGPlot svgp)
Setup the CSS classes for the plot.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.visualization.visualizers.VisFactory
makeVisualizationOrThumbnail
-
-
-
-
Field Detail
-
NAME
private static final java.lang.String NAME
Name for this visualizer.- See Also:
- Constant Field Values
-
SERIESID
private static final java.lang.String SERIESID
SVG class name for plot line- See Also:
- Constant Field Values
-
CSS_AXIS_LABEL
private static final java.lang.String CSS_AXIS_LABEL
Axis labels- See Also:
- Constant Field Values
-
-
Method Detail
-
makeVisualization
public Visualization makeVisualization(VisualizerContext context, VisualizationTask task, VisualizationPlot plot, double width, double height, Projection proj)
Description copied from interface:VisFactory
Produce a visualization instance for the given task- Specified by:
makeVisualization
in interfaceVisFactory
- Parameters:
context
- Visualization contexttask
- Visualization taskplot
- Plotwidth
- Widthheight
- Heightproj
- Projection- Returns:
- Visualization
-
clipDraw
private void clipDraw(SVGPath path, XYCurve curve, double preX, double preY, double x, double y, LinearScale scalex, LinearScale scaley, double sizex, double sizey)
Clipped drawing function for an edge.- Parameters:
path
- Path object to draw tocurve
- Curve object to draw (for drawing bounds)preX
- starting x coordinate of the edgepreY
- starting y coordinate of the edgex
- ending x coordinate of the edgey
- ending y coordinate of the edgescalex
- x-scale factor of the plotscaley
- y-scale factor of the plotsizex
- x-size of the plotsizey
- y-size of the plot
-
setupCSS
private void setupCSS(VisualizerContext context, SVGPlot svgp)
Setup the CSS classes for the plot.- Parameters:
svgp
- Plot
-
processNewResult
public void processNewResult(VisualizerContext context, java.lang.Object start)
Description copied from interface:VisFactory
Add visualizers for the given result (tree) to the context.- Specified by:
processNewResult
in interfaceVisFactory
- Specified by:
processNewResult
in interfaceVisualizationProcessor
- Parameters:
context
- Visualization contextstart
- Result to process
-
allowThumbnails
public boolean allowThumbnails(VisualizationTask task)
Description copied from interface:VisFactory
Test whether to do a thumbnail or a full rendering. Override this with "false" to disable thumbnails!- Specified by:
allowThumbnails
in interfaceVisFactory
- Parameters:
task
- Task requested
-
-