Package-level declarations

Position adjustment options.

Used as a value of the position parameter in geom_xyz() functions.

val n = 100
val m = 5
val k = 2
val rand = java.util.Random(42)
val data = mapOf(
"v" to List(n) { rand.nextInt(m) },
"c" to List(n) { rand.nextInt(k) }
)
letsPlot(data) +
geomBar(position = positionDodge()) { x="v"; fill=asDiscrete("c") }

Examples

Properties

Link copied to clipboard
val positionIdentity: PosOptions

Functions

Link copied to clipboard
fun positionDodge(width: Number? = null): PosOptions

Adjusts position by dodging overlaps to the side.

Link copied to clipboard
fun positionDodgeV(height: Number? = null): PosOptions

Adjusts position by dodging overlaps to the side.

Link copied to clipboard
fun positionFill(vjust: Number? = null, mode: String? = null): PosOptions

Adjusts position by stacking overlapping objects on top of each other and standardise each stack to have constant height.

Link copied to clipboard
fun positionJitter(width: Number? = null, height: Number? = null, seed: Int? = null): PosOptions

Adjusts position by assigning random noise to points. Better for discrete values.

Link copied to clipboard
fun positionJitterDodge(dodgeWidth: Number? = null, jitterWidth: Number? = null, jitterHeight: Number? = null, seed: Int? = null): PosOptions

This is primarily used for aligning points generated through geomPoint() with dodged boxplots (e.g., a geomBoxplot() with a fill aesthetic supplied).

Link copied to clipboard
fun positionNudge(x: Number? = null, y: Number? = null): PosOptions

Adjusts position by nudging a given offset.

Link copied to clipboard
fun positionStack(vjust: Number? = null, mode: String? = null): PosOptions

Adjusts position by stacking overlapping objects on top of each other.