Documentation of 'smile.plot.Hexmap' Java class
Hexmap
smile.plot

Class Hexmap



  • public class Hexmap
    extends Plot
    Hexmap is a variant of heat map by replacing rectangle cells with hexagon cells.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Hexmap(double[][] z)
      Constructor.
      Hexmap(double[][] z, java.awt.Color[] palette)
      Constructor.
      Hexmap(double[][] z, int k)
      Constructor.
      Hexmap(java.lang.String[][] labels, double[][] z)
      Constructor.
      Hexmap(java.lang.String[][] labels, double[][] z, java.awt.Color[] palette)
      Constructor.
      Hexmap(java.lang.String[][] labels, double[][] z, int k)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getToolTip(double[] coord)
      Returns a optional tool tip for the object at given coordinates.
      void paint(Graphics g)
      Draw the component with given graphics object.
      static PlotCanvas plot(double[][] data)
      Create a plot canvas with the pseudo hexmap plot of given data.
      static PlotCanvas plot(double[][] data, java.awt.Color[] palette)
      Create a plot canvas with the pseudo hexmap plot of given data.
      static PlotCanvas plot(java.lang.String[][] labels, double[][] data)
      Create a plot canvas with the pseudo hexmap plot of given data.
      static PlotCanvas plot(java.lang.String[][] labels, double[][] data, java.awt.Color[] palette)
      Create a plot canvas with the pseudo hexmap plot of given data.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Hexmap

        public Hexmap(double[][] z)
        Constructor. Use 16-color jet color palette.
        Parameters:
        z - a data matrix to be shown in hexmap.
      • Hexmap

        public Hexmap(double[][] z,
                      int k)
        Constructor. Use jet color palette.
        Parameters:
        z - a data matrix to be shown in hexmap.
        k - the number of colors in the palette.
      • Hexmap

        public Hexmap(double[][] z,
                      java.awt.Color[] palette)
        Constructor.
        Parameters:
        z - a data matrix to be shown in hexmap.
        palette - the color palette.
      • Hexmap

        public Hexmap(java.lang.String[][] labels,
                      double[][] z)
        Constructor. Use 16-color jet color palette.
        Parameters:
        labels - the descriptions of each cell in the data matrix.
        z - a data matrix to be shown in hexmap.
      • Hexmap

        public Hexmap(java.lang.String[][] labels,
                      double[][] z,
                      int k)
        Constructor. Use jet color palette.
        Parameters:
        labels - the descriptions of each cell in the data matrix.
        z - a data matrix to be shown in hexmap.
        k - the number of colors in the palette.
      • Hexmap

        public Hexmap(java.lang.String[][] labels,
                      double[][] z,
                      java.awt.Color[] palette)
        Constructor.
        Parameters:
        labels - the descriptions of each cell in the data matrix.
        z - a data matrix to be shown in hexmap.
        palette - the color palette.
    • Method Detail

      • getToolTip

        public java.lang.String getToolTip(double[] coord)
        Description copied from class: Plot
        Returns a optional tool tip for the object at given coordinates.
        Overrides:
        getToolTip in class Plot
        Parameters:
        coord - the logical coordinates of current mouse position.
        Returns:
        a string if an object with label close to the given coordinates. Otherwise null.
      • paint

        public void paint(Graphics g)
        Description copied from class: Shape
        Draw the component with given graphics object.
        Specified by:
        paint in class Shape
      • plot

        public static PlotCanvas plot(double[][] data)
        Create a plot canvas with the pseudo hexmap plot of given data.
        Parameters:
        data - a data matrix to be shown in hexmap.
      • plot

        public static PlotCanvas plot(double[][] data,
                                      java.awt.Color[] palette)
        Create a plot canvas with the pseudo hexmap plot of given data.
        Parameters:
        data - a data matrix to be shown in hexmap.
        palette - the color palette.
      • plot

        public static PlotCanvas plot(java.lang.String[][] labels,
                                      double[][] data)
        Create a plot canvas with the pseudo hexmap plot of given data.
        Parameters:
        labels - the descriptions of each cell in the data matrix.
        data - a data matrix to be shown in hexmap.
      • plot

        public static PlotCanvas plot(java.lang.String[][] labels,
                                      double[][] data,
                                      java.awt.Color[] palette)
        Create a plot canvas with the pseudo hexmap plot of given data.
        Parameters:
        labels - the descriptions of each cell in the data matrix.
        data - a data matrix to be shown in hexmap.
        palette - the color palette.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.