geomBracketDodge

class geomBracketDodge(val data: Map<*, *>? = null, val stat: StatOptions = Stat.identity, val position: PosOptions = positionIdentity, val showLegend: Boolean = false, val manualKey: Any? = null, val sampling: SamplingOptions? = null, val orientation: String? = null, val x: Any? = null, val y: Any? = null, val istart: Any? = null, val iend: Any? = null, val lenstart: Any? = null, val lenend: Any? = null, val label: Any? = null, val size: Any? = null, val linetype: Any? = null, val color: Any? = null, val alpha: Any? = null, val family: Any? = null, val fontface: Any? = null, val hjust: Any? = null, val vjust: Any? = null, val angle: Any? = null, val lineheight: Any? = null, val segmentColor: Any? = null, val segmentSize: Any? = null, val segmentAlpha: Any? = null, val labelFormat: String? = null, val naText: String? = null, val nudgeX: Number? = null, val nudgeY: Number? = null, val nudgeUnit: String? = null, val checkOverlap: Boolean? = null, val bracketShorten: Number? = null, val tipLengthUnit: String? = null, val dodgeWidth: Number? = null, val nGroup: Int? = null, val sizeUnit: String? = null, val colorBy: String? = null, mapping: BracketDodgeMapping.() -> Unit = {}) : Layer, BracketDodgeAesthetics, BracketDodgeParameters, TextParameters, WithSizeUnitOption, WithColorOption

Annotates a plot with labeled brackets connecting dodged groups inside each category.

Examples

Parameters

data

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

stat

default = Stat.identity. The statistical transformation to use on the data for this layer. Supported transformations: Stat.identity, Stat.count(), Stat.bin(), Stat.smooth(), Stat.density(), and Stat.sum().

showLegend

default = false. true to show the legend for this layer.

manualKey

String or result of the call to the layerKey() function. The key to show in the manual legend. Specifies the text for the legend label or advanced settings using the layerKey() function.

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.

orientation

default = "x" ("x", "y"). Specifies the axis that the geom should run along.

labelFormat

Specifies the format pattern for displaying mapped values. For more info see: formats.html.

naText

default = "n/a". Text to show for missing values.

nudgeX

Horizontal adjustment to nudge the geometry by.

nudgeY

Vertical adjustment to nudge the geometry by.

nudgeUnit

default = "identity" ("identity", "size", "px"). Units for x and y nudging. Possible values:

  • "identity": a unit of 1 corresponds to a difference of 1 in data space;

  • "size": a unit of 1 corresponds to the diameter of a point with size = 1;

  • "px": the unit is measured in screen pixels.

bracketShorten

default = 0. Symmetrically shorten the bracket by shifting both ends toward the center. Expects values between 0 and 1, where 0 corresponds to no shortening and 1 to a fully collapsed bracket.

tipLengthUnit

default = "size" ("res", "identity", "size", "px"). Unit for the lenstart and lenend aesthetics. Possible values:

  • "res": the unit equals the smallest distance between data points along the corresponding axis;

  • "identity": a unit of 1 corresponds to a difference of 1 in data space;

  • "size": a unit of 1 corresponds to the diameter of a point with size = 1;

  • "px": the unit is measured in screen pixels.

dodgeWidth

default = 0.95. Width used to compute bracket positions. Expected to match the dodge width used by other layers for proper alignment.

nGroup

Total number of dodged groups per category; used to interpret istart/iend indices. By default, this value is inferred from the data when possible, but can be set explicitly if needed.

sizeUnit

("x", "y", "min", "max"). Relate the size of the text to the length of the unit step along one of the axes. "x" uses the unit step along the x-axis, "y" uses the unit step along the y-axis. "min" uses the smaller of the unit steps along the x- and y-axes. "max" uses the larger of the unit steps along the x- and y-axes. If null, no fitting is performed.

colorBy

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

x

Primary axis category for horizontal brackets.

y

Bracket level - the position along the y-axis at which the bracket is drawn for horizontal brackets.

istart

Index of the dodged group at the bracket start. Accept integer values between 0 and nGroup - 1.

iend

Index of the dodged group at the bracket end. Accept integer values between 0 and nGroup - 1.

lenstart

Length of the tip at the bracket start (at istart).

lenend

Length of the tip at the bracket end (at iend).

label

Text to add.

size

Font size.

linetype

Type of the bracket line. 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.

color

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

alpha

Transparency level of a layer. Accept values between 0 and 1.

family

Font family. For more info see: aesthetics.html#text.

fontface

Font style and weight. For more info see: aesthetics.html#text.

hjust

Horizontal text alignment relative to the x-coordinate. Possible values: 0 or "left" - left-aligned (text starts at x), 0.5 or "middle" (default) - text is centered on x, 1 or "right" - right-aligned (text ends at x). There are two special alignments: "inward" (aligns text towards the plot center) and "outward" (away from the plot center).

vjust

Vertical text alignment relative to the y-coordinate. Accept either a numeric value or one of: "bottom", "center", or "top". The numeric values 0, 0.5 (default), and 1 correspond to "bottom", "center", and "top", respectively. There are two special alignments: "inward" (aligns text towards the plot center) and "outward" (away from the plot center).

angle

Text rotation angle in degrees.

lineheight

Line height multiplier applied to the font size in the case of multi-line text.

segmentColor

Color of the bracket line (the segments forming the bracket). For more info see: aesthetics.html#color-and-fill.

segmentSize

Width of the bracket line (the segments forming the bracket).

segmentAlpha

Transparency level of the bracket line. Accept values between 0 and 1.

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, stat: StatOptions = Stat.identity, position: PosOptions = positionIdentity, showLegend: Boolean = false, manualKey: Any? = null, sampling: SamplingOptions? = null, orientation: String? = null, x: Any? = null, y: Any? = null, istart: Any? = null, iend: Any? = null, lenstart: Any? = null, lenend: Any? = null, label: Any? = null, size: Any? = null, linetype: Any? = null, color: Any? = null, alpha: Any? = null, family: Any? = null, fontface: Any? = null, hjust: Any? = null, vjust: Any? = null, angle: Any? = null, lineheight: Any? = null, segmentColor: Any? = null, segmentSize: Any? = null, segmentAlpha: Any? = null, labelFormat: String? = null, naText: String? = null, nudgeX: Number? = null, nudgeY: Number? = null, nudgeUnit: String? = null, checkOverlap: Boolean? = null, bracketShorten: Number? = null, tipLengthUnit: String? = null, dodgeWidth: Number? = null, nGroup: Int? = null, sizeUnit: String? = null, colorBy: String? = null, mapping: BracketDodgeMapping.() -> Unit = {})

Properties

Link copied to clipboard
open override val alpha: Any? = null
Link copied to clipboard
open override val angle: Any? = null
Link copied to clipboard
open override val bracketShorten: Number? = null
Link copied to clipboard
open override val checkOverlap: Boolean? = null

Skips plotting text that overlaps previous text in the same layer.

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 dodgeWidth: Number? = null
Link copied to clipboard
open override val family: Any? = null
Link copied to clipboard
open override val fontface: Any? = null
Link copied to clipboard
Link copied to clipboard
open override val hjust: Any? = null
Link copied to clipboard
open override val iend: Any? = null
Link copied to clipboard
Link copied to clipboard
open override val istart: Any? = null
Link copied to clipboard
open override val label: Any? = null
Link copied to clipboard
open override val labelFormat: String? = null
Link copied to clipboard
val labels: layerLabels? = null
Link copied to clipboard
open override val lenend: Any? = null
Link copied to clipboard
open override val lenstart: Any? = null
Link copied to clipboard
open override val lineheight: Any? = null
Link copied to clipboard
open override val linetype: Any? = null
Link copied to clipboard
val manualKey: Any? = null
Link copied to clipboard
val mapping: Options
Link copied to clipboard
open override val naText: String? = null
Link copied to clipboard
open override val nGroup: Int? = null
Link copied to clipboard
open override val nudgeUnit: String? = null
Link copied to clipboard
open override val nudgeX: Number? = null
Link copied to clipboard
open override val nudgeY: Number? = null
Link copied to clipboard
val orientation: String? = null
Link copied to clipboard
val parameters: Options
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val segmentAlpha: Any? = null
Link copied to clipboard
open override val segmentColor: Any? = null
Link copied to clipboard
open override val segmentSize: Any? = null
Link copied to clipboard
Link copied to clipboard
open override val size: Any? = null
Link copied to clipboard
open override val sizeUnit: String? = null
Link copied to clipboard
Link copied to clipboard
open override val tipLengthUnit: String? = null
Link copied to clipboard
Link copied to clipboard
open override val vjust: Any? = null
Link copied to clipboard
open override val x: Any? = null
Link copied to clipboard
open override val y: Any? = null