library("devtools") install_github("geomdoner", "tlevine")
Windows users also must first install Rtools.
library(geomdoner) mpg$truck <- mpg$class levels(mpg$truck) <- c(TRUE,FALSE,FALSE,FALSE,TRUE,FALSE,TRUE) mpg$y2008 <- mpg$year == 2008 # Alternative is 1999 mpg$id <- row.names(mpg) set.seed(693) ggplot(mpg[sample.int(nrow(mpg), 8),]) + aes(label = paste0('Make #', id, ' (', manufacturer, ' ', model, ')'), border = drv, knoblauch = truck, scharf = grepl('auto', trans), zwiebeln = y2008, tomaten = TRUE, salat = TRUE, x = hwy, y = cty) + xlab('Highway miles per gallon') + ylab('City miles per gallon') + ggtitle('Milage of eight automobile makes.\n(Each döner is a make.)') + geom_text() + geom_doner()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.