get_plot_code <- function(p) { if (!inherits(p, "ggplot")) stop("input must be a ggplot2 object") attr(p, "gogoplot") }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.