position_raincloudx: Create a cloud of randomly jittered points below a ridgeline...

Description Usage Arguments Details See Also

View source: R/position_points_jitterx.R

Description

This is a position adjustment specifically for 'geom_density_ridges()' and related geoms. It only jitters the points drawn by these geoms, if any. If no points are present, the plot remains unchanged. The effect is similar to position_points_jitterx(), only that by default the points lie all underneath the baseline of each individual ridgeline. It add 'hexpand' that can control shift horizontally.

Usage

1
2
3
4
5
6
7
8
position_raincloudx(
  width = 0,
  height = 0.4,
  ygap = 0.05,
  hexpand = NA,
  adjust_vlines = FALSE,
  seed = NULL
)

Arguments

width

Width for horizontal jittering. By default set to 0.

height

Total height of point cloud. By default 0.4.

ygap

Vertical gap between ridgeline baseline and point cloud.

hexpand

numeric, distance to be shifted horizontally for geoms that have a position, default is NA.

adjust_vlines

If TRUE, adjusts vertical lines (as are drawn for quantile lines, for example) to align with the point cloud.

seed

Random seed. See position_points_jitterx.

Details

The idea for this position adjustment comes from Micah Allen, who proposed this type of plot in a blog post on March 15, 2018.

See Also

Other position adjustments for ridgeline plots: position_points_jitterx, position_points_sinax


ggtreeExtra documentation built on April 8, 2021, 6:01 p.m.