Add label which is the count. Acts like geom_bar() but text label at the position of the top of the bar.

geom_text_count(
  nudge_y = 0,
  position = ggplot2::position_dodge2(width = 0.9, preserve = "single"),
  ...
)

Arguments

...

Value

Examples

library(ggplot2)
ggplot(mtcars) +
   aes(x = cyl) +
   geom_bar() +
   geom_text_count(nudge_y = .5)