Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.visualization.visualizers.visunproj
Class CurveVisualizer

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
          extended by de.lmu.ifi.dbs.elki.visualization.visualizers.visunproj.CurveVisualizer
All Implemented Interfaces:
Parameterizable, UnprojectedVisualizer, Visualizer

public class CurveVisualizer
extends AbstractVisualizer
implements UnprojectedVisualizer

Visualizer to render a simple 2D curve such as a ROC curve.

Author:
Erich Schubert

Field Summary
(package private)  IterableResult<Pair<Double,Double>> curve
          Curve to visualize
private static String NAME
          Name for this visualizer.
private static String SERIESID
          SVG class name for plot line
 
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
context, metadata
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Fields inherited from interface de.lmu.ifi.dbs.elki.visualization.visualizers.Visualizer
LEVEL_BACKGROUND, LEVEL_FOREGROUND, LEVEL_INTERACTIVE, LEVEL_STATIC, META_LEVEL, META_NAME, META_NOTHUMB, META_VISIBLE, META_VISIBLE_DEFAULT
 
Constructor Summary
CurveVisualizer()
          Constructor, Parameterizable style - does nothing.
 
Method Summary
static Collection<IterableResult<Pair<Double,Double>>> findCurveResult(Result result)
          Find a 2D Double curve in the result object.
 void init(VisualizerContext context, IterableResult<Pair<Double,Double>> curve)
          Initialization.
private  void setupCSS(SVGPlot svgp)
          Setup the CSS classes for the plot.
 Element visualize(SVGPlot svgp, double width, double height)
          Returns an Element representing a visualization.
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
addRedrawListener, fireRedrawEvent, getMetadata, init, removeRedrawListener, requestRedraw, setLevel
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.visualization.visualizers.Visualizer
addRedrawListener, getMetadata, removeRedrawListener
 

Field Detail

NAME

private static final String NAME
Name for this visualizer.

See Also:
Constant Field Values

SERIESID

private static final String SERIESID
SVG class name for plot line

See Also:
Constant Field Values

curve

IterableResult<Pair<Double,Double>> curve
Curve to visualize

Constructor Detail

CurveVisualizer

public CurveVisualizer()
Constructor, Parameterizable style - does nothing.

Method Detail

init

public void init(VisualizerContext context,
                 IterableResult<Pair<Double,Double>> curve)
Initialization.

Parameters:
context - context.
curve - Curve to visualize

findCurveResult

public static Collection<IterableResult<Pair<Double,Double>>> findCurveResult(Result result)
Find a 2D Double curve in the result object.

Parameters:
result - Result object to inspect
Returns:
Collection of curves

visualize

public Element visualize(SVGPlot svgp,
                         double width,
                         double height)
Description copied from interface: UnprojectedVisualizer
Returns an Element representing a visualization.

Specified by:
visualize in interface UnprojectedVisualizer
Parameters:
svgp - the SVGPlot which will act as owner for the returned Element.
width - Width of plot
height - Height of plot
Returns:
an Element representing a 2-dimensional visualization.

setupCSS

private void setupCSS(SVGPlot svgp)
Setup the CSS classes for the plot.

Parameters:
svgp - Plot

Release 0.3 (2010-03-31_1612)