de.lmu.ifi.dbs.elki.visualization.style.marker
Class PrettyMarkers

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.visualization.style.marker.PrettyMarkers
All Implemented Interfaces:
MarkerLibrary

public class PrettyMarkers
extends Object
implements MarkerLibrary

Marker library achieving a larger number of styles by combining different shapes with different colors. Uses object ID management by SVGPlot.


Field Summary
private  ColorLibrary colors
          Color library
private static String DEFAULT_PREFIX
          Default prefix to use.
private  String prefix
          Prefix for the IDs generated.
 
Constructor Summary
PrettyMarkers(String prefix, StyleLibrary style)
          Constructor
PrettyMarkers(StyleLibrary style)
          Constructor without prefix argument, will use DEFAULT_PREFIX as prefix.
 
Method Summary
 void plotMarker(SVGPlot plot, Element parent, double x, double y, int style, double size)
          Draw an marker used in scatter plots.
 Element useMarker(SVGPlot plot, Element parent, double x, double y, int style, double size)
          Insert a marker at the given coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colors

private ColorLibrary colors
Color library


DEFAULT_PREFIX

private static final String DEFAULT_PREFIX
Default prefix to use.

See Also:
Constant Field Values

prefix

private String prefix
Prefix for the IDs generated.

Constructor Detail

PrettyMarkers

public PrettyMarkers(String prefix,
                     StyleLibrary style)
Constructor

Parameters:
prefix - prefix to use.
style - style library to use

PrettyMarkers

public PrettyMarkers(StyleLibrary style)
Constructor without prefix argument, will use DEFAULT_PREFIX as prefix.

Parameters:
style - Style library to use
Method Detail

plotMarker

public void plotMarker(SVGPlot plot,
                       Element parent,
                       double x,
                       double y,
                       int style,
                       double size)
Draw an marker used in scatter plots. If you intend to use the markers multiple times, you should consider using the useMarker(de.lmu.ifi.dbs.elki.visualization.svg.SVGPlot, org.w3c.dom.Element, double, double, int, double) method instead, which exploits the SVG features of symbol definition and use

Parameters:
plot - containing plot
parent - parent node
x - position
y - position
style - marker style (enumerated)
size - size

useMarker

public Element useMarker(SVGPlot plot,
                         Element parent,
                         double x,
                         double y,
                         int style,
                         double size)
Description copied from interface: MarkerLibrary
Insert a marker at the given coordinates. Markers will be defined in the defs part of the document, and then SVG-"use"d at the given coordinates. This supposedly is more efficient and significantly reduces file size. Symbols will be named "s0", "s1" etc.; these names must not be used by other elements in the SVG document!

Specified by:
useMarker in interface MarkerLibrary
Parameters:
plot - Plot to draw on
parent - parent node
x - coordinate
y - coordinate
style - style (enumerated)
size - size
Returns:
Element node generated.

Release 0.4.0 (2011-09-20_1324)