Skip to content

Instantly share code, notes, and snippets.

@baptiste
Created December 7, 2016 18:57
Show Gist options
  • Save baptiste/1fc18eef0e9034c6de4e8630040041e8 to your computer and use it in GitHub Desktop.
Save baptiste/1fc18eef0e9034c6de4e8630040041e8 to your computer and use it in GitHub Desktop.
library(ggplot2)
p <- ggplot(data = diamonds, mapping = aes(x = clarity)) + geom_bar(aes(fill = cut)) +
theme_void() +
theme(legend.position="none",
panel.background = element_rect(fill="grey80"),
plot.background = element_rect(fill="red"))
g <- ggplotGrob(p)
grid::grid.newpage()
grid::grid.draw(g$grobs[[6]])
@baptiste
Copy link
Author

baptiste commented Dec 7, 2016

screen shot 2016-12-08 at 7 57 40 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment