public class Hexmap extends Plot
| Modifier and Type | Class and Description |
|---|---|
static interface |
Hexmap.Tooltip
The lambda interface to retrieve the tooltip of cell.
|
| Constructor and Description |
|---|
Hexmap(double[][] z,
java.awt.Color[] palette,
Hexmap.Tooltip tooltip)
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 Hexmap |
of(double[][] z)
Creates a hexmap with 16-color jet color palette.
|
static Hexmap |
of(double[][] z,
java.awt.Color[] palette)
Constructor.
|
static Hexmap |
of(double[][] z,
int k)
Creates a hexmap with the jet color palette.
|
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 Hexmap(double[][] z,
java.awt.Color[] palette,
Hexmap.Tooltip tooltip)
z - a data matrix to be shown in hexmap.palette - the color palette.tooltip - the lambda to return the description of cells.public java.util.Optional<java.lang.String> tooltip(double[] coord)
Plotpublic double[] getLowerBound()
PlotgetLowerBound in class Plotpublic double[] getUpperBound()
PlotgetUpperBound in class Plotpublic static Hexmap of(double[][] z)
z - a data matrix to be shown in hexmap.public static Hexmap of(double[][] z, int k)
z - a data matrix to be shown in hexmap.k - the number of colors in the palette.public static Hexmap of(double[][] z, java.awt.Color[] palette)
z - a data matrix to be shown in hexmap.palette - the color palette.