Class Heatmap
java.lang.Object
smile.plot.swing.Shape
smile.plot.swing.Plot
smile.plot.swing.Heatmap
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 -
Method Summary
Modifier and TypeMethodDescriptionfigure()Returns a figure containing the plot.double[]Returns the lower bound of data.double[]Returns the upper bound of data.static Heatmapof(double[][] z) Creates a heatmap with 16-color jet color palette.static Heatmapof(double[][] z, int k) Creates a heatmap with jet color palette.static HeatmapCreates a heatmap with given color palette.static Heatmapof(double[] x, double[] y, double[][] z) Creates a heatmap with 16-color jet color palette.static Heatmapof(double[] x, double[] y, double[][] z, int k) Creates a heatmap with jet color palette.static HeatmapCreates a heatmap with 16-color jet color palette.static HeatmapCreates a heatmap with jet color palette.voidDraws the shape.tooltip(double[] coord) Returns an optional tooltip for the object at given coordinates.
-
Constructor Details
-
Heatmap
-
Heatmap
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 Details
-
tooltip
Description copied from class:PlotReturns an optional tooltip for the object at given coordinates. -
getLowerBound
public double[] getLowerBound()Description copied from class:PlotReturns the lower bound of data.- Specified by:
getLowerBoundin classPlot- Returns:
- the lower bound of data.
-
getUpperBound
public double[] getUpperBound()Description copied from class:PlotReturns the upper bound of data.- Specified by:
getUpperBoundin classPlot- Returns:
- the upper bound of data.
-
paint
-
figure
-
of
Creates a heatmap with 16-color jet color palette.- Parameters:
z- a data matrix to be shown in pseudo heat map.- Returns:
- the heatmap.
-
of
Creates a heatmap with jet color palette.- Parameters:
z- a data matrix to be shown in pseudo heat map.k- the number of colors in the palette.- Returns:
- the heatmap.
-
of
-
of
-
of
Creates a heatmap with jet color palette.- Parameters:
rowLabels- the row labels.columnLabels- the column labels.z- a data matrix to be shown in pseudo heat map.k- the number of colors in the palette.- Returns:
- the heatmap.
-
of
Creates a heatmap with 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.- Returns:
- the heatmap.
-
of
Creates a heatmap with 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.- Returns:
- the heatmap.
-