Borrowing instructions from r-bloggers

library("tidyverse")

d <- data.frame(x = seq(0,8, by = 0.1)) %>%
  mutate(`No intervention` = dnorm(x, 2, 0.8),
         `With intervention` = dnorm(x, 5, 2)) %>%
  pivot_longer(-x, names_to = "intervention", values_to = "count") %>%
  mutate(zero = 0)

favicon = ggplot(d, aes(x, ymin = zero, ymax = count, fill = intervention)) +
  geom_ribbon(alpha = 0.8) +
  theme_void() +
  theme(legend.position = "none") 

favicon

center

ggsave("favicon32.png", 
       plot = favicon, scale = 1, width = 1, height = 1, dpi = 32, bg = "transparent")


blog comments powered by Disqus

Published

12 March 2020

Tags