plot-api / jetbrains.letsPlot.geom / geom_bin2d

geom_bin2d

class geom_bin2d : TileAesthetics, Bin2dStatAesthetics, Bin2dStatParameters, LayerBase

Divide the plane into a grid and color the bins by the count of cases in them.

Parameters

data - dictionary or pandas DataFrame, optional. The data to be displayed in this layer. If None, the default, the data is inherited from the plot data as specified in the call to lets_plot.

stat - string, default: "bin". The statistical transformation to use on the data for this layer.

position - string, optional. Position adjustment, either as a string ("identity", "stack", "dodge", ...), or the result of a call to a position adjustment function.

bins - pair of numbers, default: (30,30) Number of bins in both directions, vertical and horizontal. Overridden by binwidth.

binWidth - pair of numbers, optional The width of the bins in both directions, vertical and horizontal. Overrides bins. The default is to use bin widths that cover the entire range of the data.

drop - : bool, optional, default: True Specifies whether to remove all bins with 0 counts.

x - x-axis value.

y - y-axis value.

width - width of a tile.

height - height of a tile.

alpha - number in [0..1] Transparency level of a layer.

color - (colour) color of a geometry lines.

fill - color of geometry filling.

linetype - type of the line. Codes and names: 0 = "blank", 1 = "solid", 2 = "dashed", 3 = "dotted", 4 = "dotdash", 5 = "longdash", 6 = "twodash".

size - lines width.

mapping - set of aesthetic mappings. Aesthetic mappings describe the way that variables in the data are mapped to plot "aesthetics".

Constructors

<init>

Divide the plane into a grid and color the bins by the count of cases in them.

geom_bin2d(data: Map<*, *>? = null, stat: StatOptions = Stat.bin2d(), position: PosOptions = Pos.identity, showLegend: Boolean = true, sampling: SamplingOptions? = null, x: Double? = null, y: Double? = null, width: Double? = null, height: Double? = null, alpha: Number? = null, color: Any? = null, fill: Any? = null, linetype: Any? = null, size: Number? = null, weight: Any? = null, bins: Pair<Int, Int>? = null, binWidth: Pair<Number?, Number?>? = null, drop: Boolean? = null, mapping: Bin2dMapping.() -> Unit = {})

Properties

alpha

number in [0..1] Transparency level of a layer.

val alpha: Number?

bins

pair of numbers, default: (30,30) Number of bins in both directions, vertical and horizontal. Overridden by binwidth.

val bins: Pair<Int, Int>?

binWidth

pair of numbers, optional The width of the bins in both directions, vertical and horizontal. Overrides bins. The default is to use bin widths that cover the entire range of the data.

val binWidth: Pair<Number?, Number?>?

color

(colour) color of a geometry lines.

val color: Any?

drop

: bool, optional, default: True Specifies whether to remove all bins with 0 counts.

val drop: Boolean?

fill

color of geometry filling.

val fill: Any?

height

height of a tile.

val height: Double?

linetype

type of the line. Codes and names: 0 = "blank", 1 = "solid", 2 = "dashed", 3 = "dotted", 4 = "dotdash", 5 = "longdash", 6 = "twodash".

val linetype: Any?

size

lines width.

val size: Number?

weight

val weight: Any?

width

width of a tile.

val width: Double?

x

x-axis value.

val x: Double?

y

y-axis value.

val y: Double?

Functions

seal

fun seal(): Options

Extension Functions

toSpec

fun Layer.toSpec(): MutableMap<String, Any>