Skip to contents

geom_fulcrum() sits on the x axis at the balancing point of the data.

Usage

geom_fulcrum(
  mapping = NULL,
  data = NULL,
  position = "identity",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)

Value

a geom layer that sits at the balancing point of the data based on x and optionally a weight

Examples

library(ggplot2)
ggplot(data = prize_wheel) +
aes(x = payout, y = frequency, weight = frequency) +
geom_lollipop() +
geom_fulcrum(color = "red", shape = 2, size = 5)


library(ggplot2)
ggplot(data = cars) +
aes(x = speed, y = dist) +
geom_point() +
geom_rug() +
geom_fulcrum(color = "red", shape = 2, size = 5)