Class PrettyMarkers

  • All Implemented Interfaces:
    MarkerLibrary

    public class PrettyMarkers
    extends java.lang.Object
    implements MarkerLibrary
    Marker library achieving a larger number of styles by combining different shapes with different colors. Uses object ID management by SVGPlot.

    TODO: Add more styles

    Since:
    0.4.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ColorLibrary colors
      Color library
      private static java.lang.String DEFAULT_PREFIX
      Default prefix to use.
      private java.lang.String dotcolor
      Color of "uncolored" dots
      private java.lang.String graycolor
      Color of "grayed out" dots
      (package private) ColorInterpolation interpol
      Color interpolation style
      private java.lang.String prefix
      Prefix for the IDs generated.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.w3c.dom.Element plotMarker​(SVGPlot plot, double x, double y, int style, double size, double intensity)
      Draw an marker used in scatter plots.
      protected org.w3c.dom.Element plotSimple​(SVGPlot plot, double x, double y, double size, java.lang.String color)
      Plot a replacement marker when no color is set; usually black
      org.w3c.dom.Element useMarker​(SVGPlot plot, double x, double y, int style, double size, double intensity)
      Insert a soft 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

      • DEFAULT_PREFIX

        private static final java.lang.String DEFAULT_PREFIX
        Default prefix to use.
        See Also:
        Constant Field Values
      • prefix

        private java.lang.String prefix
        Prefix for the IDs generated.
      • dotcolor

        private java.lang.String dotcolor
        Color of "uncolored" dots
      • graycolor

        private java.lang.String graycolor
        Color of "grayed out" dots
    • Constructor Detail

      • PrettyMarkers

        public PrettyMarkers​(java.lang.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 org.w3c.dom.Element plotMarker​(SVGPlot plot,
                                              double x,
                                              double y,
                                              int style,
                                              double size,
                                              double intensity)
        Draw an marker used in scatter plots.
        Parameters:
        plot - containing plot
        x - position
        y - position
        style - marker style (enumerated)
        size - size
        Returns:
        container element
      • plotSimple

        protected org.w3c.dom.Element plotSimple​(SVGPlot plot,
                                                 double x,
                                                 double y,
                                                 double size,
                                                 java.lang.String color)
        Plot a replacement marker when no color is set; usually black
        Parameters:
        plot - Plot to draw to
        x - X position
        y - Y position
        size - Size
        color - Color string
      • useMarker

        public org.w3c.dom.Element useMarker​(SVGPlot plot,
                                             double x,
                                             double y,
                                             int style,
                                             double size,
                                             double intensity)
        Description copied from interface: MarkerLibrary
        Insert a soft marker at the given coordinates.
        Specified by:
        useMarker in interface MarkerLibrary
        Parameters:
        plot - Plot to draw on
        x - coordinate
        y - coordinate
        style - style (enumerated)
        size - size
        intensity - intensity of the color
        Returns:
        Element node generated.