library(tibble)
library(dplyr)
library(ggplot2)
library(writer)
chart <- dplyr::bind_rows(
dplyr::bind_rows(list(
tibble::tibble( color = "blue", price=rnorm(500, 10, 1.9) ),
tibble::tibble( color = "green", price=rnorm(500, 14.5, 1.9) ),
tibble::tibble( color = "red", price=rnorm(500, 9.5, 1.9) )
))
) %>%
ggplot2::ggplot(ggplot2::aes(
x = price,
fill = color
)) +
ggplot2::geom_density(alpha = 0.2, position = "stack") +
ggplot2::scale_fill_manual(values = c("blue","green","red")) +
writer::graph_theme()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.