Package smile.plot.swing
Class Hexmap
java.lang.Object
smile.plot.swing.Shape
smile.plot.swing.Plot
smile.plot.swing.Hexmap
Hexmap is a variant of heat map by replacing rectangle cells with hexagon cells.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe lambda interface to retrieve the tooltip of cell. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanvas()Returns a canvas of the plot.double[]Returns the lower bound of data.double[]Returns the upper bound of data.static Hexmapof(double[][] z) Creates a hexmap with 16-color jet color palette.static Hexmapof(double[][] z, int k) Creates a hexmap with the jet color palette.static HexmapConstructor.voidDraws the shape.tooltip(double[] coord) Returns a optional tool tip for the object at given coordinates.
-
Constructor Details
-
Hexmap
Constructor.- Parameters:
z- a data matrix to be shown in hexmap.palette- the color palette.tooltip- the lambda to return the description of cells.
-
-
Method Details
-
tooltip
Description copied from class:PlotReturns a optional tool tip for the object at given coordinates. -
getLowerBound
public double[] getLowerBound()Description copied from class:PlotReturns the lower bound of data.- Specified by:
getLowerBoundin classPlot
-
getUpperBound
public double[] getUpperBound()Description copied from class:PlotReturns the upper bound of data.- Specified by:
getUpperBoundin classPlot
-
paint
Description copied from class:ShapeDraws the shape. -
canvas
Description copied from class:PlotReturns a canvas of the plot. -
of
Creates a hexmap with 16-color jet color palette.- Parameters:
z- a data matrix to be shown in hexmap.
-
of
Creates a hexmap with the jet color palette.- Parameters:
z- a data matrix to be shown in hexmap.k- the number of colors in the palette.
-
of
Constructor.- Parameters:
z- a data matrix to be shown in hexmap.palette- the color palette.
-