Created
December 8, 2022 13:57
-
-
Save cararthompson/8e9451341cde62c5e89f878c3b8e6edf to your computer and use it in GitHub Desktop.
waffle background
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Output 1 - retains white space around the plot | |
| plot + | |
| waffle::geom_waffle(aes(fill = species, | |
| values = n), | |
| colour = "lightblue", | |
| make_proportional = FALSE, | |
| size = 2) + | |
| theme(plot.background = element_rect(fill = "lightblue", | |
| color = "lightblue")) | |
| # Output 2 - white space is gone! | |
| waffle_plot <- plot + | |
| waffle::geom_waffle(aes(fill = species, | |
| values = n), | |
| colour = "lightblue", | |
| make_proportional = FALSE, | |
| size = 2) | |
| cowplot::plot_grid(waffle_plot) + | |
| theme(plot.background = element_rect(fill = "lightblue", | |
| color = "lightblue")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment