Package-level declarations

Types

Link copied to clipboard
typealias ColorScale<Z> = (Z) -> Color
Link copied to clipboard
typealias HeatMapGrid<Z> = Array<Array<Z>>

Functions

Link copied to clipboard
fun <Z : Comparable<Z>> discreteColorScale(thresholds: List<Z>, colors: List<Color>): ColorScale<Z>

Creates a discrete color scale that maps values to specific colors.

Creates a discrete color scale with automatic binning.

Link copied to clipboard
fun <Z : Comparable<Z>, Number> divergingColorScale(domain: ClosedRange<Z>, lowColor: Color = Color.Blue, midColor: Color = Color.White, highColor: Color = Color.Red): ColorScale<Z>

Creates a diverging color scale with a neutral midpoint.

Link copied to clipboard
fun <T, X : Comparable<X>, Number, Y : Comparable<Y>, Number> generateHistogram2D(samples: List<T>, xDomain: ClosedRange<X>, yDomain: ClosedRange<Y>, xGetter: (T) -> X, yGetter: (T) -> Y, nBinsX: Int = 100, nBinsY: Int = 100): HeatMapGrid<Int>

Generates a 2D histogram from a list of samples.

Link copied to clipboard
fun <X : Comparable<X>, Y : Comparable<Y>, Z> XYGraphScope<X, Y>.HeatMapPlot(xDomain: ClosedRange<X>, yDomain: ClosedRange<Y>, bins: HeatMapGrid<Z>, colorScale: (Z) -> Color, alphaScale: (Z) -> Float = { 1f }, animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

A HeatMap plot displays 2-dimensional data values as color.

Link copied to clipboard

Creates a linear color scale that interpolates between colors.