class: center, middle, inverse, title-slide # Plot Ensembles ## With flipbookr and xaringan ### Gina Reynolds, December 2019 --- --- Composing plots or ensembles can help you tell a fuller picture of your data. External packages cowplot and patchwork are demonstrated here. Try to be consistent with encoding of color, linetype, shape across plots! --- class: split-40 count: false .left-panel-build_plots-auto[ ```r *options(scipen = 99) # turns off scientific notation ``` ] .right-panel-build_plots-auto[ ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation *library(gapminder) ``` ] .right-panel-build_plots-auto[ ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) *gapminder ``` ] .right-panel-build_plots-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% * filter(year == 2007) ``` ] .right-panel-build_plots-auto[ ``` # A tibble: 142 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 2007 43.8 31889923 975. 2 Albania Europe 2007 76.4 3600523 5937. 3 Algeria Africa 2007 72.3 33333216 6223. 4 Angola Africa 2007 42.7 12420476 4797. 5 Argentina Americas 2007 75.3 40301927 12779. 6 Australia Oceania 2007 81.2 20434176 34435. 7 Austria Europe 2007 79.8 8199783 36126. 8 Bahrain Asia 2007 75.6 708573 29796. 9 Bangladesh Asia 2007 64.1 150448339 1391. 10 Belgium Europe 2007 79.4 10392226 33693. # … with 132 more rows ``` ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% * filter(continent == "Oceania") ``` ] .right-panel-build_plots-auto[ ``` # A tibble: 2 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Australia Oceania 2007 81.2 20434176 34435. 2 New Zealand Oceania 2007 80.2 4115771 25185. ``` ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% * ggplot() ``` ] .right-panel-build_plots-auto[ <img src="ensembles_files/figure-html/build_plots_auto_6_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% ggplot() + * aes(x = country, y = pop/1000000, fill = country) ``` ] .right-panel-build_plots-auto[ <img src="ensembles_files/figure-html/build_plots_auto_7_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% ggplot() + aes(x = country, y = pop/1000000, fill = country) + * geom_col() ``` ] .right-panel-build_plots-auto[ <img src="ensembles_files/figure-html/build_plots_auto_8_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% ggplot() + aes(x = country, y = pop/1000000, fill = country) + geom_col() -> *p1 ``` ] .right-panel-build_plots-auto[ ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% ggplot() + aes(x = country, y = pop/1000000, fill = country) + geom_col() -> p1 *gapminder ``` ] .right-panel-build_plots-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% ggplot() + aes(x = country, y = pop/1000000, fill = country) + geom_col() -> p1 gapminder %>% * filter(year == 2007) ``` ] .right-panel-build_plots-auto[ ``` # A tibble: 142 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 2007 43.8 31889923 975. 2 Albania Europe 2007 76.4 3600523 5937. 3 Algeria Africa 2007 72.3 33333216 6223. 4 Angola Africa 2007 42.7 12420476 4797. 5 Argentina Americas 2007 75.3 40301927 12779. 6 Australia Oceania 2007 81.2 20434176 34435. 7 Austria Europe 2007 79.8 8199783 36126. 8 Bahrain Asia 2007 75.6 708573 29796. 9 Bangladesh Asia 2007 64.1 150448339 1391. 10 Belgium Europe 2007 79.4 10392226 33693. # … with 132 more rows ``` ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% ggplot() + aes(x = country, y = pop/1000000, fill = country) + geom_col() -> p1 gapminder %>% filter(year == 2007) %>% * ggplot() ``` ] .right-panel-build_plots-auto[ <img src="ensembles_files/figure-html/build_plots_auto_12_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% ggplot() + aes(x = country, y = pop/1000000, fill = country) + geom_col() -> p1 gapminder %>% filter(year == 2007) %>% ggplot() + * aes(x = gdpPercap, y = lifeExp) ``` ] .right-panel-build_plots-auto[ <img src="ensembles_files/figure-html/build_plots_auto_13_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% ggplot() + aes(x = country, y = pop/1000000, fill = country) + geom_col() -> p1 gapminder %>% filter(year == 2007) %>% ggplot() + aes(x = gdpPercap, y = lifeExp) + * geom_point(color = "grey") ``` ] .right-panel-build_plots-auto[ <img src="ensembles_files/figure-html/build_plots_auto_14_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% ggplot() + aes(x = country, y = pop/1000000, fill = country) + geom_col() -> p1 gapminder %>% filter(year == 2007) %>% ggplot() + aes(x = gdpPercap, y = lifeExp) + geom_point(color = "grey") + * geom_point(data = . %>% * filter(continent == "Oceania"), * aes(color = country), * size = 3) ``` ] .right-panel-build_plots-auto[ <img src="ensembles_files/figure-html/build_plots_auto_15_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots-auto[ ```r options(scipen = 99) # turns off scientific notation library(gapminder) gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% ggplot() + aes(x = country, y = pop/1000000, fill = country) + geom_col() -> p1 gapminder %>% filter(year == 2007) %>% ggplot() + aes(x = gdpPercap, y = lifeExp) + geom_point(color = "grey") + geom_point(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 3) -> *p2 ``` ] .right-panel-build_plots-auto[ ] <style> .left-panel-build_plots-auto { color: #777; width: 38.6138613861386%; height: 92%; float: left; font-size: 80% } .right-panel-build_plots-auto { width: 59.4059405940594%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-build_plots-auto { width: 0%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r *gapminder ``` ] .right-panel-build_plots2-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% * ggplot() ``` ] .right-panel-build_plots2-auto[ <img src="ensembles_files/figure-html/build_plots2_auto_2_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + * aes(x = year, y = pop/1000000) ``` ] .right-panel-build_plots2-auto[ <img src="ensembles_files/figure-html/build_plots2_auto_3_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + * geom_line(color = "grey") ``` ] .right-panel-build_plots2-auto[ <img src="ensembles_files/figure-html/build_plots2_auto_4_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + * aes(group = country) ``` ] .right-panel-build_plots2-auto[ <img src="ensembles_files/figure-html/build_plots2_auto_5_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + * scale_y_log10() ``` ] .right-panel-build_plots2-auto[ <img src="ensembles_files/figure-html/build_plots2_auto_6_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + * geom_line(data = . %>% * filter(continent == "Oceania"), * aes(color = country), * size = 1.5) ``` ] .right-panel-build_plots2-auto[ <img src="ensembles_files/figure-html/build_plots2_auto_7_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + geom_line(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 1.5) -> *p3 ``` ] .right-panel-build_plots2-auto[ ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + geom_line(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 1.5) -> p3 *gapminder ``` ] .right-panel-build_plots2-auto[ ``` # A tibble: 1,704 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 1952 28.8 8425333 779. 2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853. 4 Afghanistan Asia 1967 34.0 11537966 836. 5 Afghanistan Asia 1972 36.1 13079460 740. 6 Afghanistan Asia 1977 38.4 14880372 786. 7 Afghanistan Asia 1982 39.9 12881816 978. 8 Afghanistan Asia 1987 40.8 13867957 852. 9 Afghanistan Asia 1992 41.7 16317921 649. 10 Afghanistan Asia 1997 41.8 22227415 635. # … with 1,694 more rows ``` ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + geom_line(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 1.5) -> p3 gapminder %>% * filter(year == 2007) ``` ] .right-panel-build_plots2-auto[ ``` # A tibble: 142 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Afghanistan Asia 2007 43.8 31889923 975. 2 Albania Europe 2007 76.4 3600523 5937. 3 Algeria Africa 2007 72.3 33333216 6223. 4 Angola Africa 2007 42.7 12420476 4797. 5 Argentina Americas 2007 75.3 40301927 12779. 6 Australia Oceania 2007 81.2 20434176 34435. 7 Austria Europe 2007 79.8 8199783 36126. 8 Bahrain Asia 2007 75.6 708573 29796. 9 Bangladesh Asia 2007 64.1 150448339 1391. 10 Belgium Europe 2007 79.4 10392226 33693. # … with 132 more rows ``` ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + geom_line(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 1.5) -> p3 gapminder %>% filter(year == 2007) %>% * filter(continent == "Oceania") ``` ] .right-panel-build_plots2-auto[ ``` # A tibble: 2 x 6 country continent year lifeExp pop gdpPercap <fct> <fct> <int> <dbl> <int> <dbl> 1 Australia Oceania 2007 81.2 20434176 34435. 2 New Zealand Oceania 2007 80.2 4115771 25185. ``` ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + geom_line(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 1.5) -> p3 gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% * mutate(gdp = pop*gdpPercap) ``` ] .right-panel-build_plots2-auto[ ``` # A tibble: 2 x 7 country continent year lifeExp pop gdpPercap gdp <fct> <fct> <int> <dbl> <int> <dbl> <dbl> 1 Australia Oceania 2007 81.2 20434176 34435. 703658358894. 2 New Zealand Oceania 2007 80.2 4115771 25185. 103655730130. ``` ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + geom_line(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 1.5) -> p3 gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% mutate(gdp = pop*gdpPercap) %>% * ggplot() ``` ] .right-panel-build_plots2-auto[ <img src="ensembles_files/figure-html/build_plots2_auto_13_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + geom_line(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 1.5) -> p3 gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% mutate(gdp = pop*gdpPercap) %>% ggplot() + * aes(x = gdp/1000000000, y = country, color = country) ``` ] .right-panel-build_plots2-auto[ <img src="ensembles_files/figure-html/build_plots2_auto_14_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + geom_line(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 1.5) -> p3 gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% mutate(gdp = pop*gdpPercap) %>% ggplot() + aes(x = gdp/1000000000, y = country, color = country) + * geom_segment(aes(yend = country, xend = 0)) ``` ] .right-panel-build_plots2-auto[ <img src="ensembles_files/figure-html/build_plots2_auto_15_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + geom_line(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 1.5) -> p3 gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% mutate(gdp = pop*gdpPercap) %>% ggplot() + aes(x = gdp/1000000000, y = country, color = country) + geom_segment(aes(yend = country, xend = 0)) + * geom_point(size = 5) ``` ] .right-panel-build_plots2-auto[ <img src="ensembles_files/figure-html/build_plots2_auto_16_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-build_plots2-auto[ ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + geom_line(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 1.5) -> p3 gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% mutate(gdp = pop*gdpPercap) %>% ggplot() + aes(x = gdp/1000000000, y = country, color = country) + geom_segment(aes(yend = country, xend = 0)) + geom_point(size = 5) -> *p4 ``` ] .right-panel-build_plots2-auto[ ] <style> .left-panel-build_plots2-auto { color: #777; width: 38.6138613861386%; height: 92%; float: left; font-size: 80% } .right-panel-build_plots2-auto { width: 59.4059405940594%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-build_plots2-auto { width: 0%; float: left; padding-left: 1%; font-size: 80% } </style> ```r gapminder %>% ggplot() + aes(x = year, y = pop/1000000) + geom_line(color = "grey") + aes(group = country) + scale_y_log10() + geom_line(data = . %>% filter(continent == "Oceania"), aes(color = country), size = 1.5) -> p3 gapminder %>% filter(year == 2007) %>% filter(continent == "Oceania") %>% mutate(gdp = pop*gdpPercap) %>% ggplot() + aes(x = gdp/1000000000, y = country, color = country) + geom_segment(aes(yend = country, xend = 0)) + geom_point(size = 5) -> p4 ``` --- class: inverse, center, middle # {patchwork} ## "The composer of plots" --- class: split-40 count: false .left-panel-patch-rotate[ ```r library(patchwork) p1 + p2 / p3 ``` ] .right-panel-patch-rotate[ <img src="ensembles_files/figure-html/patch_rotate_1_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-patch-rotate[ ```r library(patchwork) *p1 | p2 ``` ] .right-panel-patch-rotate[ <img src="ensembles_files/figure-html/patch_rotate_2_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-patch-rotate[ ```r library(patchwork) *p1 + p2 ``` ] .right-panel-patch-rotate[ <img src="ensembles_files/figure-html/patch_rotate_3_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-patch-rotate[ ```r library(patchwork) *p1 / p2 ``` ] .right-panel-patch-rotate[ <img src="ensembles_files/figure-html/patch_rotate_4_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-patch-rotate[ ```r library(patchwork) *(p1 + p2) / p3 + p4 ``` ] .right-panel-patch-rotate[ <img src="ensembles_files/figure-html/patch_rotate_5_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-patch-rotate[ ```r library(patchwork) *(p1 + p2 + p3) / p4 ``` ] .right-panel-patch-rotate[ <img src="ensembles_files/figure-html/patch_rotate_6_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-patch-rotate[ ```r library(patchwork) *(p1 + plot_spacer()) / (p3 + p2) ``` ] .right-panel-patch-rotate[ <img src="ensembles_files/figure-html/patch_rotate_7_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-patch-rotate[ ```r library(patchwork) *p1 + p2 + p3 + p4 + plot_layout(widths = c(2, 1)) ``` ] .right-panel-patch-rotate[ <img src="ensembles_files/figure-html/patch_rotate_8_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-patch-rotate[ ```r library(patchwork) *p1 + p2 + p3 + p4 + plot_layout(widths = c(2, 1), heights = unit(c(5, 1), c('cm', 'null'))) ``` ] .right-panel-patch-rotate[ <img src="ensembles_files/figure-html/patch_rotate_9_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-patch-rotate[ ```r library(patchwork) *p1 + p2 + p3 + p4 + plot_layout(guides = 'collect') ``` ] .right-panel-patch-rotate[ <img src="ensembles_files/figure-html/patch_rotate_10_output-1.png" width="432" /> ] <style> .left-panel-patch-rotate { color: #777; width: 59%; height: 92%; float: left; font-size: 80% } .right-panel-patch-rotate { width: 40%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-patch-rotate { width: NA%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: split-40 count: false .left-panel-ensemble_level-auto[ ```r *p4 ``` ] .right-panel-ensemble_level-auto[ <img src="ensembles_files/figure-html/ensemble_level_auto_1_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-ensemble_level-auto[ ```r p4 + * p2 ``` ] .right-panel-ensemble_level-auto[ <img src="ensembles_files/figure-html/ensemble_level_auto_2_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-ensemble_level-auto[ ```r p4 + p2 + * plot_annotation(title = 'Hi', * subtitle = 'my subtitle', * caption = 'the caption') ``` ] .right-panel-ensemble_level-auto[ <img src="ensembles_files/figure-html/ensemble_level_auto_3_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-ensemble_level-auto[ ```r p4 + p2 + plot_annotation(title = 'Hi', subtitle = 'my subtitle', caption = 'the caption') & * theme(panel.background = element_rect(fill = "purple")) ``` ] .right-panel-ensemble_level-auto[ <img src="ensembles_files/figure-html/ensemble_level_auto_4_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-ensemble_level-auto[ ```r p4 + p2 + plot_annotation(title = 'Hi', subtitle = 'my subtitle', caption = 'the caption') & theme(panel.background = element_rect(fill = "purple")) & * theme(plot.background = element_rect(fill = "purple")) ``` ] .right-panel-ensemble_level-auto[ <img src="ensembles_files/figure-html/ensemble_level_auto_5_output-1.png" width="432" /> ] <style> .left-panel-ensemble_level-auto { color: #777; width: 38.6138613861386%; height: 92%; float: left; font-size: 80% } .right-panel-ensemble_level-auto { width: 59.4059405940594%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-ensemble_level-auto { width: 0%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: inverse, center, middle # {cowplot} # plot composition and more from *C*laus *O*. *W*ilke --- class: split-40 count: false .left-panel-cow-rotate[ ```r library(cowplot) plot_grid(p1, p2, labels = c('A', 'B'), label_size = 12) ``` ] .right-panel-cow-rotate[ <img src="ensembles_files/figure-html/cow_rotate_1_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow-rotate[ ```r library(cowplot) *plot_grid(p1, p3, labels = c('A', 'B'), label_size = 15) ``` ] .right-panel-cow-rotate[ <img src="ensembles_files/figure-html/cow_rotate_2_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow-rotate[ ```r library(cowplot) *plot_grid(p1, p2, labels = "AUTO") ``` ] .right-panel-cow-rotate[ <img src="ensembles_files/figure-html/cow_rotate_3_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow-rotate[ ```r library(cowplot) *plot_grid(p1, p2, labels = "auto") ``` ] .right-panel-cow-rotate[ <img src="ensembles_files/figure-html/cow_rotate_4_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow-rotate[ ```r library(cowplot) *plot_grid(p3, p2, labels = "AUTO", align = "h") ``` ] .right-panel-cow-rotate[ <img src="ensembles_files/figure-html/cow_rotate_5_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow-rotate[ ```r library(cowplot) *plot_grid(p1, p2, label_fontfamily = "serif", label_colour = "blue") ``` ] .right-panel-cow-rotate[ <img src="ensembles_files/figure-html/cow_rotate_6_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow-rotate[ ```r library(cowplot) *plot_grid(p1, p2, labels = "AUTO", ncol = 1) ``` ] .right-panel-cow-rotate[ <img src="ensembles_files/figure-html/cow_rotate_7_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow-rotate[ ```r library(cowplot) *plot_grid(p1, NULL, NULL, p2, labels = "AUTO", ncol = 2) ``` ] .right-panel-cow-rotate[ <img src="ensembles_files/figure-html/cow_rotate_8_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow-rotate[ ```r library(cowplot) *plot_grid(p1, p2, labels = "AUTO", rel_widths = c(1, 2)) ``` ] .right-panel-cow-rotate[ <img src="ensembles_files/figure-html/cow_rotate_9_output-1.png" width="432" /> ] <style> .left-panel-cow-rotate { color: #777; width: 38.6138613861386%; height: 92%; float: left; font-size: 80% } .right-panel-cow-rotate { width: 59.4059405940594%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-cow-rotate { width: 0%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: split-40 count: false .left-panel-draw-auto[ ```r *library(cowplot) ``` ] .right-panel-draw-auto[ ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) *system.file("extdata", "logo.png", package = "cowplot") ``` ] .right-panel-draw-auto[ ``` [1] "/Library/Frameworks/R.framework/Versions/3.6/Resources/library/cowplot/extdata/logo.png" ``` ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> * logo_file ``` ] .right-panel-draw-auto[ ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file *ggplot(mpg, aes(displ, cty)) ``` ] .right-panel-draw-auto[ <img src="ensembles_files/figure-html/draw_auto_4_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file ggplot(mpg, aes(displ, cty)) + * geom_point() ``` ] .right-panel-draw-auto[ <img src="ensembles_files/figure-html/draw_auto_5_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file ggplot(mpg, aes(displ, cty)) + geom_point() + * theme_minimal_grid(12) ``` ] .right-panel-draw-auto[ <img src="ensembles_files/figure-html/draw_auto_6_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file ggplot(mpg, aes(displ, cty)) + geom_point() + theme_minimal_grid(12) -> *p ``` ] .right-panel-draw-auto[ ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file ggplot(mpg, aes(displ, cty)) + geom_point() + theme_minimal_grid(12) -> p *ggdraw() ``` ] .right-panel-draw-auto[ <img src="ensembles_files/figure-html/draw_auto_8_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file ggplot(mpg, aes(displ, cty)) + geom_point() + theme_minimal_grid(12) -> p ggdraw() + * draw_plot(p) ``` ] .right-panel-draw-auto[ <img src="ensembles_files/figure-html/draw_auto_9_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file ggplot(mpg, aes(displ, cty)) + geom_point() + theme_minimal_grid(12) -> p ggdraw() + draw_plot(p) + * draw_image(logo_file, x = 1, hjust = 1, width = 0.13, height = 0.2) ``` ] .right-panel-draw-auto[ <img src="ensembles_files/figure-html/draw_auto_10_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file ggplot(mpg, aes(displ, cty)) + geom_point() + theme_minimal_grid(12) -> p ggdraw() + draw_plot(p) + draw_image(logo_file, x = 1, hjust = 1, width = 0.13, height = 0.2) -> *logo_plot1 ``` ] .right-panel-draw-auto[ ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file ggplot(mpg, aes(displ, cty)) + geom_point() + theme_minimal_grid(12) -> p ggdraw() + draw_plot(p) + draw_image(logo_file, x = 1, hjust = 1, width = 0.13, height = 0.2) -> logo_plot1 *ggdraw() ``` ] .right-panel-draw-auto[ <img src="ensembles_files/figure-html/draw_auto_12_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file ggplot(mpg, aes(displ, cty)) + geom_point() + theme_minimal_grid(12) -> p ggdraw() + draw_plot(p) + draw_image(logo_file, x = 1, hjust = 1, width = 0.13, height = 0.2) -> logo_plot1 ggdraw() + * draw_image(logo_file, scale = 0.5) ``` ] .right-panel-draw-auto[ <img src="ensembles_files/figure-html/draw_auto_13_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file ggplot(mpg, aes(displ, cty)) + geom_point() + theme_minimal_grid(12) -> p ggdraw() + draw_plot(p) + draw_image(logo_file, x = 1, hjust = 1, width = 0.13, height = 0.2) -> logo_plot1 ggdraw() + draw_image(logo_file, scale = 0.5) + * draw_plot(p) ``` ] .right-panel-draw-auto[ <img src="ensembles_files/figure-html/draw_auto_14_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-draw-auto[ ```r library(cowplot) system.file("extdata", "logo.png", package = "cowplot") -> logo_file ggplot(mpg, aes(displ, cty)) + geom_point() + theme_minimal_grid(12) -> p ggdraw() + draw_plot(p) + draw_image(logo_file, x = 1, hjust = 1, width = 0.13, height = 0.2) -> logo_plot1 ggdraw() + draw_image(logo_file, scale = 0.5) + draw_plot(p) -> *logo_plot ``` ] .right-panel-draw-auto[ ] <style> .left-panel-draw-auto { color: #777; width: 38.6138613861386%; height: 92%; float: left; font-size: 80% } .right-panel-draw-auto { width: 59.4059405940594%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-draw-auto { width: 0%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: split-40 count: false .left-panel-bottom-auto[ ```r *library(cowplot) ``` ] .right-panel-bottom-auto[ ] --- class: split-40 count: false .left-panel-bottom-auto[ ```r library(cowplot) *mtcars ``` ] .right-panel-bottom-auto[ ``` mpg cyl disp hp drat wt qsec vs am gear carb Mazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1 Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1 Hornet Sportabout 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2 Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1 Duster 360 14.3 8 360.0 245 3.21 3.570 15.84 0 0 3 4 Merc 240D 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2 Merc 230 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2 Merc 280 19.2 6 167.6 123 3.92 3.440 18.30 1 0 4 4 Merc 280C 17.8 6 167.6 123 3.92 3.440 18.90 1 0 4 4 Merc 450SE 16.4 8 275.8 180 3.07 4.070 17.40 0 0 3 3 Merc 450SL 17.3 8 275.8 180 3.07 3.730 17.60 0 0 3 3 Merc 450SLC 15.2 8 275.8 180 3.07 3.780 18.00 0 0 3 3 Cadillac Fleetwood 10.4 8 472.0 205 2.93 5.250 17.98 0 0 3 4 Lincoln Continental 10.4 8 460.0 215 3.00 5.424 17.82 0 0 3 4 Chrysler Imperial 14.7 8 440.0 230 3.23 5.345 17.42 0 0 3 4 Fiat 128 32.4 4 78.7 66 4.08 2.200 19.47 1 1 4 1 Honda Civic 30.4 4 75.7 52 4.93 1.615 18.52 1 1 4 2 Toyota Corolla 33.9 4 71.1 65 4.22 1.835 19.90 1 1 4 1 Toyota Corona 21.5 4 120.1 97 3.70 2.465 20.01 1 0 3 1 Dodge Challenger 15.5 8 318.0 150 2.76 3.520 16.87 0 0 3 2 AMC Javelin 15.2 8 304.0 150 3.15 3.435 17.30 0 0 3 2 Camaro Z28 13.3 8 350.0 245 3.73 3.840 15.41 0 0 3 4 Pontiac Firebird 19.2 8 400.0 175 3.08 3.845 17.05 0 0 3 2 Fiat X1-9 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1 Porsche 914-2 26.0 4 120.3 91 4.43 2.140 16.70 0 1 5 2 Lotus Europa 30.4 4 95.1 113 3.77 1.513 16.90 1 1 5 2 Ford Pantera L 15.8 8 351.0 264 4.22 3.170 14.50 0 1 5 4 Ferrari Dino 19.7 6 145.0 175 3.62 2.770 15.50 0 1 5 6 Maserati Bora 15.0 8 301.0 335 3.54 3.570 14.60 0 1 5 8 Volvo 142E 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2 ``` ] --- class: split-40 count: false .left-panel-bottom-auto[ ```r library(cowplot) mtcars %>% *ggplot() ``` ] .right-panel-bottom-auto[ <img src="ensembles_files/figure-html/bottom_auto_3_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-bottom-auto[ ```r library(cowplot) mtcars %>% ggplot() + * aes(x = qsec, y = disp) ``` ] .right-panel-bottom-auto[ <img src="ensembles_files/figure-html/bottom_auto_4_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-bottom-auto[ ```r library(cowplot) mtcars %>% ggplot() + aes(x = qsec, y = disp) + * geom_point() + facet_wrap(~gear) ``` ] .right-panel-bottom-auto[ <img src="ensembles_files/figure-html/bottom_auto_5_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-bottom-auto[ ```r library(cowplot) mtcars %>% ggplot() + aes(x = qsec, y = disp) + geom_point() + facet_wrap(~gear) -> *top_row ``` ] .right-panel-bottom-auto[ ] --- class: split-40 count: false .left-panel-bottom-auto[ ```r library(cowplot) mtcars %>% ggplot() + aes(x = qsec, y = disp) + geom_point() + facet_wrap(~gear) -> top_row *plot_grid(p1, p2, * labels = c('B', 'C'), * label_size = 12) ``` ] .right-panel-bottom-auto[ <img src="ensembles_files/figure-html/bottom_auto_7_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-bottom-auto[ ```r library(cowplot) mtcars %>% ggplot() + aes(x = qsec, y = disp) + geom_point() + facet_wrap(~gear) -> top_row plot_grid(p1, p2, labels = c('B', 'C'), label_size = 12) -> *bottom_row ``` ] .right-panel-bottom-auto[ ] --- class: split-40 count: false .left-panel-bottom-auto[ ```r library(cowplot) mtcars %>% ggplot() + aes(x = qsec, y = disp) + geom_point() + facet_wrap(~gear) -> top_row plot_grid(p1, p2, labels = c('B', 'C'), label_size = 12) -> bottom_row *plot_grid(p3, bottom_row, * labels = c('A', ''), * label_size = 12, ncol = 1) ``` ] .right-panel-bottom-auto[ <img src="ensembles_files/figure-html/bottom_auto_9_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-bottom-auto[ ```r library(cowplot) mtcars %>% ggplot() + aes(x = qsec, y = disp) + geom_point() + facet_wrap(~gear) -> top_row plot_grid(p1, p2, labels = c('B', 'C'), label_size = 12) -> bottom_row plot_grid(p3, bottom_row, labels = c('A', ''), label_size = 12, ncol = 1) -> *my_plot4 ``` ] .right-panel-bottom-auto[ ] <style> .left-panel-bottom-auto { color: #777; width: 38.6138613861386%; height: 92%; float: left; font-size: 80% } .right-panel-bottom-auto { width: 59.4059405940594%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-bottom-auto { width: 0%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: split-40 count: false .left-panel-cow2-auto[ ```r *ggdraw(p1) ``` ] .right-panel-cow2-auto[ <img src="ensembles_files/figure-html/cow2_auto_1_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow2-auto[ ```r ggdraw(p1) + * draw_label("Draft", color = "#D0B0B0", * size = 100, angle = 45) ``` ] .right-panel-cow2-auto[ <img src="ensembles_files/figure-html/cow2_auto_2_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow2-auto[ ```r ggdraw(p1) + draw_label("Draft", color = "#D0B0B0", size = 100, angle = 45) -> *my_plot ``` ] .right-panel-cow2-auto[ ] --- class: split-40 count: false .left-panel-cow2-auto[ ```r ggdraw(p1) + draw_label("Draft", color = "#D0B0B0", size = 100, angle = 45) -> my_plot *ggdraw(p1 + theme_half_open(12)) ``` ] .right-panel-cow2-auto[ <img src="ensembles_files/figure-html/cow2_auto_4_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow2-auto[ ```r ggdraw(p1) + draw_label("Draft", color = "#D0B0B0", size = 100, angle = 45) -> my_plot ggdraw(p1 + theme_half_open(12)) + * draw_plot(p2, .45, .45, .5, .5) ``` ] .right-panel-cow2-auto[ <img src="ensembles_files/figure-html/cow2_auto_5_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-cow2-auto[ ```r ggdraw(p1) + draw_label("Draft", color = "#D0B0B0", size = 100, angle = 45) -> my_plot ggdraw(p1 + theme_half_open(12)) + draw_plot(p2, .45, .45, .5, .5) + * draw_plot_label( * c("A", "B"), * c(0, 0.45), * c(1, 0.95), * size = 12 * ) ``` ] .right-panel-cow2-auto[ <img src="ensembles_files/figure-html/cow2_auto_6_output-1.png" width="432" /> ] <style> .left-panel-cow2-auto { color: #777; width: 59%; height: 92%; float: left; font-size: 80% } .right-panel-cow2-auto { width: 40%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-cow2-auto { width: NA%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: split-40 count: false .left-panel-image-auto[ ```r *library(cowplot) ``` ] .right-panel-image-auto[ ] --- class: split-40 count: false .left-panel-image-auto[ ```r library(cowplot) *library(magick) ``` ] .right-panel-image-auto[ ] --- class: split-40 count: false .left-panel-image-auto[ ```r library(cowplot) library(magick) *system.file("extdata", "cow.jpg", package = "cowplot") ``` ] .right-panel-image-auto[ ``` [1] "/Library/Frameworks/R.framework/Versions/3.6/Resources/library/cowplot/extdata/cow.jpg" ``` ] --- class: split-40 count: false .left-panel-image-auto[ ```r library(cowplot) library(magick) system.file("extdata", "cow.jpg", package = "cowplot") %>% * magick::image_read() ``` ] .right-panel-image-auto[ <img src="ensembles_files/figure-html/image_auto_4_output-1.png" width="507" /> ] --- class: split-40 count: false .left-panel-image-auto[ ```r library(cowplot) library(magick) system.file("extdata", "cow.jpg", package = "cowplot") %>% magick::image_read() %>% * magick::image_resize("570x380") ``` ] .right-panel-image-auto[ <img src="ensembles_files/figure-html/image_auto_5_output-1.png" width="253" /> ] --- class: split-40 count: false .left-panel-image-auto[ ```r library(cowplot) library(magick) system.file("extdata", "cow.jpg", package = "cowplot") %>% magick::image_read() %>% magick::image_resize("570x380") %>% * magick::image_colorize(35, "white") ``` ] .right-panel-image-auto[ <img src="ensembles_files/figure-html/image_auto_6_output-1.png" width="253" /> ] --- class: split-40 count: false .left-panel-image-auto[ ```r library(cowplot) library(magick) system.file("extdata", "cow.jpg", package = "cowplot") %>% magick::image_read() %>% magick::image_resize("570x380") %>% magick::image_colorize(35, "white") -> *img ``` ] .right-panel-image-auto[ ] --- class: split-40 count: false .left-panel-image-auto[ ```r library(cowplot) library(magick) system.file("extdata", "cow.jpg", package = "cowplot") %>% magick::image_read() %>% magick::image_resize("570x380") %>% magick::image_colorize(35, "white") -> img *ggdraw() ``` ] .right-panel-image-auto[ <img src="ensembles_files/figure-html/image_auto_8_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-image-auto[ ```r library(cowplot) library(magick) system.file("extdata", "cow.jpg", package = "cowplot") %>% magick::image_read() %>% magick::image_resize("570x380") %>% magick::image_colorize(35, "white") -> img ggdraw() + * draw_image(img) ``` ] .right-panel-image-auto[ <img src="ensembles_files/figure-html/image_auto_9_output-1.png" width="432" /> ] --- class: split-40 count: false .left-panel-image-auto[ ```r library(cowplot) library(magick) system.file("extdata", "cow.jpg", package = "cowplot") %>% magick::image_read() %>% magick::image_resize("570x380") %>% magick::image_colorize(35, "white") -> img ggdraw() + draw_image(img) + * draw_plot(p) ``` ] .right-panel-image-auto[ <img src="ensembles_files/figure-html/image_auto_10_output-1.png" width="432" /> ] <style> .left-panel-image-auto { color: #777; width: 59%; height: 92%; float: left; font-size: 80% } .right-panel-image-auto { width: 40%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-image-auto { width: NA%; float: left; padding-left: 1%; font-size: 80% } </style> --- A final topic coming up is [concision](concision.html). Some strategies for not repeating yourself and a few other topics. <style type="text/css"> .remark-code{line-height: 1.5; font-size: 80%} </style>