ggiraph in xaringan

library(xaringan)
library(ggplot2)
library(ggiraph)
dat <- mtcars
dat$carname <- row.names(mtcars)
gg_point = ggplot(data = dat) +
    geom_point_interactive(aes(x = wt, y = qsec, color = disp,
    tooltip = paste(carname, disp, sep = "\n"), data_id = carname)) + theme_minimal()
x <- girafe(ggobj = gg_point)
x


Try the ggiraph package in your browser

Any scripts or data that you put into this service are public.

ggiraph documentation built on March 31, 2023, 9:53 p.m.