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

Class Heatmap



  • public class Heatmap
    extends Plot
    A heat map is a graphical representation of data where the values taken by a variable in a two-dimensional map are represented as colors.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Heatmap(double[][] z)
      Constructor.
      Heatmap(double[][] z, java.awt.Color[] palette)
      Constructor.
      Heatmap(double[][] z, int k)
      Constructor.
      Heatmap(double[] x, double[] y, double[][] z)
      Constructor.
      Heatmap(double[] x, double[] y, double[][] z, java.awt.Color[] palette)
      Constructor.
      Heatmap(double[] x, double[] y, double[][] z, int k)
      Constructor.
      Heatmap(java.lang.String[] rowLabels, java.lang.String[] columnLabels, double[][] z)
      Constructor.
      Heatmap(java.lang.String[] rowLabels, java.lang.String[] columnLabels, double[][] z, java.awt.Color[] palette)
      Constructor.
      Heatmap(java.lang.String[] rowLabels, java.lang.String[] columnLabels, 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[][] z)
      Create a plot canvas with the pseudo heat map plot of given data.
      static PlotCanvas plot(double[][] z, java.awt.Color[] palette)
      Create a plot canvas with the pseudo heat map plot of given data.
      static PlotCanvas plot(double[] x, double[] y, double[][] z)
      Create a plot canvas with the pseudo heat map plot of given data.
      static PlotCanvas plot(double[] x, double[] y, double[][] z, java.awt.Color[] palette)
      Create a plot canvas with the pseudo heat map plot of given data.
      static PlotCanvas plot(java.lang.String[] rowLabels, java.lang.String[] columnLabels, double[][] z)
      Create a plot canvas with the pseudo heat map plot of given data.
      static PlotCanvas plot(java.lang.String[] rowLabels, java.lang.String[] columnLabels, double[][] z, java.awt.Color[] palette)
      Create a plot canvas with the pseudo heat map plot of given data.
      • Methods inherited from class java.lang.Object

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

      • Heatmap

        public Heatmap(double[][] z)
        Constructor. Use 16-color jet color palette.
      • Heatmap

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

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

        public Heatmap(java.lang.String[] rowLabels,
                       java.lang.String[] columnLabels,
                       double[][] z)
        Constructor. Use 16-color jet color palette.
      • Heatmap

        public Heatmap(java.lang.String[] rowLabels,
                       java.lang.String[] columnLabels,
                       double[][] z,
                       int k)
        Constructor. Use jet color palette.
        Parameters:
        z - a data matrix to be shown in pseudo heat map.
        k - the number of colors in the palette.
      • Heatmap

        public Heatmap(java.lang.String[] rowLabels,
                       java.lang.String[] columnLabels,
                       double[][] z,
                       java.awt.Color[] palette)
        Constructor.
        Parameters:
        z - a data matrix to be shown in pseudo heat map.
        palette - the color palette.
      • Heatmap

        public Heatmap(double[] x,
                       double[] y,
                       double[][] z)
        Constructor. Use 16-color jet color palette.
        Parameters:
        x - x coordinate of data matrix cells. Must be in ascending order.
        y - y coordinate of data matrix cells. Must be in ascending order.
        z - a data matrix to be shown in pseudo heat map.
      • Heatmap

        public Heatmap(double[] x,
                       double[] y,
                       double[][] z,
                       int k)
        Constructor. Use jet color palette.
        Parameters:
        x - x coordinate of data matrix cells. Must be in ascending order.
        y - y coordinate of data matrix cells. Must be in ascending order.
        z - a data matrix to be shown in pseudo heat map.
        k - the number of colors in the palette.
      • Heatmap

        public Heatmap(double[] x,
                       double[] y,
                       double[][] z,
                       java.awt.Color[] palette)
        Constructor.
        Parameters:
        x - x coordinate of data matrix cells. Must be in ascending order.
        y - y coordinate of data matrix cells. Must be in ascending order.
        z - a data matrix to be shown in pseudo heat map.
        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[][] z)
        Create a plot canvas with the pseudo heat map plot of given data.
        Parameters:
        z - a data matrix to be shown in pseudo heat map.
      • plot

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

        public static PlotCanvas plot(double[] x,
                                      double[] y,
                                      double[][] z)
        Create a plot canvas with the pseudo heat map plot of given data.
        Parameters:
        x - x coordinate of data matrix cells. Must be in ascending order.
        y - y coordinate of data matrix cells. Must be in ascending order.
        z - a data matrix to be shown in pseudo heat map.
      • plot

        public static PlotCanvas plot(double[] x,
                                      double[] y,
                                      double[][] z,
                                      java.awt.Color[] palette)
        Create a plot canvas with the pseudo heat map plot of given data.
        Parameters:
        x - x coordinate of data matrix cells. Must be in ascending order.
        y - y coordinate of data matrix cells. Must be in ascending order.
        z - a data matrix to be shown in pseudo heat map.
        palette - the color palette.
      • plot

        public static PlotCanvas plot(java.lang.String[] rowLabels,
                                      java.lang.String[] columnLabels,
                                      double[][] z)
        Create a plot canvas with the pseudo heat map plot of given data.
        Parameters:
        z - a data matrix to be shown in pseudo heat map.
        rowLabels - the labels for rows of data matrix.
        columnLabels - the labels for columns of data matrix.
      • plot

        public static PlotCanvas plot(java.lang.String[] rowLabels,
                                      java.lang.String[] columnLabels,
                                      double[][] z,
                                      java.awt.Color[] palette)
        Create a plot canvas with the pseudo heat map plot of given data.
        Parameters:
        z - a data matrix to be shown in pseudo heat map.
        rowLabels - the labels for rows of data matrix.
        columnLabels - the labels for columns of data matrix.
        palette - the color palette.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.