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") }
Content copied to clipboard
Examples
Functions
Link copied to clipboard
Adjusts position by dodging overlaps to the side.
Link copied to clipboard
Adjusts position by dodging overlaps to the side.
Link copied to clipboard
Adjusts position by stacking overlapping objects on top of each other and standardise each stack to have constant height.
Link copied to clipboard
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
Adjusts position by nudging a given offset.
Link copied to clipboard
Adjusts position by stacking overlapping objects on top of each other.