geom Bracket Dodge
Annotates a plot with labeled brackets connecting dodged groups inside each category.
Examples
Parameters
The data to be displayed. If null, the default, the data is inherited from the plot data as specified in the call to letsPlot.
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().
default = positionIdentity. Position adjustment. Use, for example, positionDodge(), positionJitter(), positionNudge(), positionJitterDodge(), positionFill(), positionStack(), or positionIdentity.
default = false. true to show the legend for this layer.
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.
Result of the call to the samplingXxx() function. To prevent any sampling for this layer pass value samplingNone. For more info see sampling.html.
default = "x" ("x", "y"). Specifies the axis that the geom should run along.
Specifies the format pattern for displaying mapped values. For more info see: formats.html.
default = "n/a". Text to show for missing values.
Horizontal adjustment to nudge the geometry by.
Vertical adjustment to nudge the geometry by.
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.
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.
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.
default = 0.95. Width used to compute bracket positions. Expected to match the dodge width used by other layers for proper alignment.
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.
("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.
default = "color" ("fill", "color", "paint_a", "paint_b", "paint_c"). Defines the color aesthetic for the geometry.
Primary axis category for horizontal brackets.
Bracket level - the position along the y-axis at which the bracket is drawn for horizontal brackets.
Index of the dodged group at the bracket start. Accept integer values between 0 and nGroup - 1.
Index of the dodged group at the bracket end. Accept integer values between 0 and nGroup - 1.
Length of the tip at the bracket start (at istart).
Length of the tip at the bracket end (at iend).
Text to add.
Font size.
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 of the geometry. For more info see: aesthetics.html#color-and-fill.
Transparency level of a layer. Accept values between 0 and 1.
Font family. For more info see: aesthetics.html#text.
Font style and weight. For more info see: aesthetics.html#text.
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).
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).
Text rotation angle in degrees.
Line height multiplier applied to the font size in the case of multi-line text.
Color of the bracket line (the segments forming the bracket). For more info see: aesthetics.html#color-and-fill.
Width of the bracket line (the segments forming the bracket).
Transparency level of the bracket line. Accept values between 0 and 1.
Set of aesthetic mappings. Aesthetic mappings describe the way that variables in the data are mapped to plot "aesthetics".
Constructors
Properties
Skips plotting text that overlaps previous text in the same layer.