examples/geom_hex_interactive.R

library(ggplot2)
library(ggiraph)

p <- ggplot(diamonds, aes(carat, price)) +
  geom_hex_interactive(aes(tooltip = after_stat(count)), bins = 10)
x <- girafe(ggobj = p)
if( interactive() ) print(x)
davidgohel/ggiraph documentation built on April 13, 2024, 7:19 a.m.