statSummaryBin

class statSummaryBin(val data: Map<*, *>? = null, val geom: GeomOptions = Geom.pointrange(), val position: PosOptions = positionIdentity, val showLegend: Boolean = true, val inheritAes: Boolean? = null, val manualKey: Any? = null, val sampling: SamplingOptions? = null, val tooltips: TooltipOptions? = null, val orientation: String? = null, val x: Any? = null, val y: Any? = null, val ymin: Any? = null, val ymax: Any? = null, val xmin: Any? = null, val xmax: Any? = null, val alpha: Any? = null, val color: Any? = null, val fill: Any? = null, val linetype: Any? = null, val shape: Any? = null, val size: Any? = null, val stroke: Any? = null, val linewidth: Any? = null, val bins: Int? = null, val binWidth: Number? = null, val center: Number? = null, val boundary: Number? = null, val threshold: Number? = null, val fn: String? = null, val fnMin: String? = null, val fnMax: String? = null, val quantiles: List<Number>? = null, val colorBy: String? = null, val fillBy: String? = null, mapping: PointRangeMapping.() -> Unit = {}) : Layer, PointRangeAesthetics, SummaryBinStatParameters, WithColorOption, WithFillOption

Displays a distribution by dividing variable mapped to x-axis into bins and applying aggregation functions to each bin.

Notes

Computed variables:

  • ..y.. : result of calculating of fn.

  • ..ymin.. : result of calculating of fnMin.

  • ..ymax.. : result of calculating of fnMax.

To hide axis tooltips, set "blank" or the result of elementBlank() to the axisTooltip or axisTooltipX parameter of the theme().

Examples

Parameters

data

The data to be displayed in this layer. If null, the default, the data is inherited from the plot data as specified in the call to letsPlot.

geom

The geometry to display the binned summary stat for this layer, default is Geom.pointrange(), see Geom.

position

Position adjustment: positionIdentity, positionStack(), positionDodge(), etc. see Position.

showLegend

default = true. false - do not show legend for this layer.

inheritAes

default = true. false - do not combine the layer aesthetic mappings with the plot shared mappings.

sampling

Result of the call to the samplingXxx() function. To prevent any sampling for this layer pass value samplingNone. For more info see sampling.html.

tooltips

Result of the call to the layerTooltips() function. Specifies appearance, style and content. Set tooltips = tooltipsNone to hide tooltips from the layer.

orientation

Specifies the axis that the layer's stat and geom should run along, default = "x". Possible values: "x", "y".

fn

default = "mean" ("count", "sum", "mean", "median", "min", "max", "lq", "mq", "uq"). Name of function computing stat variable ..y... Names "lq", "mq", "uq" correspond to lower, middle and upper quantiles, default = listOf(0.25, 0.5, 0.75).

fnMin

default = "min" ("count", "sum", "mean", "median", "min", "max", "lq", "mq", "uq"). Name of function computing stat variable ..ymin... Names "lq", "mq", "uq" correspond to lower, middle and upper quantiles, default = listOf(0.25, 0.5, 0.75).

fnMax

default = "max" ("count", "sum", "mean", "median", "min", "max", "lq", "mq", "uq"). Name of function computing stat variable ..ymax... Names "lq", "mq", "uq" correspond to lower, middle and upper quantiles, default = listOf(0.25, 0.5, 0.75).

quantiles

default = listOf(0.25, 0.5, 0.75). A list of probabilities defining the quantile functions "lq", "mq" and "uq". Must contain exactly 3 values between 0 and 1.

bins

Number of bins. Overridden by binwidth.

binWidth

The width of the bins. The default is to use bin widths that cover the range of the data. You should always override this value, exploring multiple widths to find the best to illustrate the stories in your data.

center

Specifies x-value to align bin centers to.

boundary

Specifies x-value to align bin boundary (i.e. point between bins) to.

threshold

default = null Only bins with a ..count.. greater than the threshold will be displayed. This is useful for free scales in facets - use threshold=0 to make the plot take up the entire panel space.

x

X-axis coordinates for vertical interval / position of mid-point for horizontal interval.

y

Y-axis coordinates for horizontal interval / position of mid-point for vertical interval.

ymin

Lower bound for vertical interval.

ymax

Upper bound for vertical interval.

xmin

Lower bound for horizontal interval.

xmax

Upper bound for horizontal interval.

alpha

Transparency level of a layer. Understands numbers between 0 and 1.

color

Color of the geometry. For more info see: aesthetics.html#color-and-fill.

fill

Fill color. For more info see: aesthetics.html#color-and-fill.

size

Lines width, size of mid-point.

stroke

Width of the shape border. Applied only to the shapes having border.

linewidth

Line width.

linetype

Type of the line of border. Accept codes or names (0 = "blank", 1 = "solid", 2 = "dashed", 3 = "dotted", 4 = "dotdash", 5 = "longdash", 6 = "twodash"), a hex string (up to 8 digits for dash-gap lengths), or a pattern offset to listOf(dash, gap, ...) / listOf(dash, gap, ...). For more info see: aesthetics.html#line-types.

shape

Shape of the mid-point. For more info see: aesthetics.html#point-shapes.

colorBy

default = "color" ("fill", "color", "paint_a", "paint_b", "paint_c"). Defines the color aesthetic for the geometry.

fillBy

default = "fill" ("fill", "color", "paint_a", "paint_b", "paint_c"). Defines the fill aesthetic for the geometry.

mapping

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

Constructors

Link copied to clipboard
constructor(data: Map<*, *>? = null, geom: GeomOptions = Geom.pointrange(), position: PosOptions = positionIdentity, showLegend: Boolean = true, inheritAes: Boolean? = null, manualKey: Any? = null, sampling: SamplingOptions? = null, tooltips: TooltipOptions? = null, orientation: String? = null, x: Any? = null, y: Any? = null, ymin: Any? = null, ymax: Any? = null, xmin: Any? = null, xmax: Any? = null, alpha: Any? = null, color: Any? = null, fill: Any? = null, linetype: Any? = null, shape: Any? = null, size: Any? = null, stroke: Any? = null, linewidth: Any? = null, bins: Int? = null, binWidth: Number? = null, center: Number? = null, boundary: Number? = null, threshold: Number? = null, fn: String? = null, fnMin: String? = null, fnMax: String? = null, quantiles: List<Number>? = null, colorBy: String? = null, fillBy: String? = null, mapping: PointRangeMapping.() -> Unit = {})

Properties

Link copied to clipboard
open override val alpha: Any? = null
Link copied to clipboard
open override val bins: Int? = null
Link copied to clipboard
open override val binWidth: Number? = null
Link copied to clipboard
open override val boundary: Number? = null
Link copied to clipboard
open override val center: Number? = null
Link copied to clipboard
open override val color: Any? = null
Link copied to clipboard
open override val colorBy: String? = null
Link copied to clipboard
val data: Map<*, *>? = null
Link copied to clipboard
open override val fill: Any? = null
Link copied to clipboard
open override val fillBy: String? = null
Link copied to clipboard
open override val fn: String? = null
Link copied to clipboard
open override val fnMax: String? = null
Link copied to clipboard
open override val fnMin: String? = null
Link copied to clipboard
val geom: GeomOptions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val linetype: Any? = null
Link copied to clipboard
open override val linewidth: Any? = null
Link copied to clipboard
val manualKey: Any? = null
Link copied to clipboard
val mapping: <Error class: unknown class>
Link copied to clipboard
val orientation: String? = null
Link copied to clipboard
val parameters: <Error class: unknown class>
Link copied to clipboard
val position: PosOptions?
Link copied to clipboard
open override val quantiles: List<Number>? = null
Link copied to clipboard
val sampling: SamplingOptions? = null
Link copied to clipboard
open override val shape: Any? = null
Link copied to clipboard
Link copied to clipboard
open override val size: Any? = null
Link copied to clipboard
val stat: StatOptions
Link copied to clipboard
open override val stroke: Any? = null
Link copied to clipboard
open override val threshold: Number? = null
Link copied to clipboard
Link copied to clipboard
open override val x: Any? = null
Link copied to clipboard
open override val xmax: Any? = null
Link copied to clipboard
open override val xmin: Any? = null
Link copied to clipboard
open override val y: Any? = null
Link copied to clipboard
open override val ymax: Any? = null
Link copied to clipboard
open override val ymin: Any? = null