public class Heatmap extends Plot
| Constructor and Description |
|---|
Heatmap(double[] x,
double[] y,
double[][] z,
java.awt.Color[] palette)
Constructor.
|
Heatmap(java.lang.String[] rowLabels,
java.lang.String[] columnLabels,
double[][] z,
java.awt.Color[] palette)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Canvas |
canvas()
Returns a canvas of the plot.
|
double[] |
getLowerBound()
Returns the lower bound of data.
|
double[] |
getUpperBound()
Returns the upper bound of data.
|
static Heatmap |
of(double[][] z)
Constructor.
|
static Heatmap |
of(double[][] z,
java.awt.Color[] palette)
Constructor.
|
static Heatmap |
of(double[][] z,
int k)
Creates a heatmap with jet color palette.
|
static Heatmap |
of(double[] x,
double[] y,
double[][] z)
Constructor.
|
static Heatmap |
of(double[] x,
double[] y,
double[][] z,
int k)
Constructor.
|
static Heatmap |
of(java.lang.String[] rowLabels,
java.lang.String[] columnLabels,
double[][] z)
Constructor.
|
static Heatmap |
of(java.lang.String[] rowLabels,
java.lang.String[] columnLabels,
double[][] z,
int k)
Constructor.
|
void |
paint(Graphics g)
Draws the shape.
|
java.util.Optional<java.lang.String> |
tooltip(double[] coord)
Returns a optional tool tip for the object at given coordinates.
|
public Heatmap(java.lang.String[] rowLabels,
java.lang.String[] columnLabels,
double[][] z,
java.awt.Color[] palette)
rowLabels - the labels of rows.columnLabels - the labels of columns.z - a data matrix to be shown in pseudo heat map.palette - the color palette.public Heatmap(double[] x,
double[] y,
double[][] z,
java.awt.Color[] palette)
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.public java.util.Optional<java.lang.String> tooltip(double[] coord)
Plotpublic double[] getLowerBound()
PlotgetLowerBound in class Plotpublic double[] getUpperBound()
PlotgetUpperBound in class Plotpublic static Heatmap of(double[][] z)
public static Heatmap of(double[][] z, int k)
z - a data matrix to be shown in pseudo heat map.k - the number of colors in the palette.public static Heatmap of(double[][] z, java.awt.Color[] palette)
z - a data matrix to be shown in pseudo heat map.palette - the color palette.public static Heatmap of(java.lang.String[] rowLabels, java.lang.String[] columnLabels, double[][] z)
public static Heatmap of(java.lang.String[] rowLabels, java.lang.String[] columnLabels, double[][] z, int k)
z - a data matrix to be shown in pseudo heat map.k - the number of colors in the palette.public static Heatmap of(double[] x, double[] y, double[][] z)
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.public static Heatmap of(double[] x, double[] y, double[][] z, int k)
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.