diff --git a/arranging-plots.qmd b/arranging-plots.qmd index 3b113d78..a920878b 100644 --- a/arranging-plots.qmd +++ b/arranging-plots.qmd @@ -25,7 +25,7 @@ Often, one wants to show two or more plots side by side to show different aspect This is the scenario that patchwork was build to solve. At its heart, patchwork is a package that extends ggplot2's use of the `+` operator to work between multiple plots, as well as add additional operators for specialized compositions and working with compositions of plots. -As an example of the most basic use of patchwork, we'll use the following 4 plots of the `mpg` dataset +As an example of the most basic use of patchwork, we'll use the following 4 plots of the `mpg` dataset. ```{r} p1 <- ggplot(mpg) + @@ -85,7 +85,7 @@ p1 / p2 p3 | p4 ``` -patchwork allows nesting layouts which means that it is possible to create some very intricate layouts using just these two operators +patchwork allows nesting layouts which means that it is possible to create some very intricate layouts using just these two operators: ```{r} p3 | (p2 / (p1 | p4)) @@ -165,7 +165,7 @@ The titles formatted according to the theme specification in the `plot_annotatio p34 + plot_annotation(theme = theme_gray(base_family = "mono")) ``` -As the global theme often follows the theme of the subplots, using `&` along with a theme object will modify the global theme as well as the themes of the subplots +As the global theme often follows the theme of the subplots, using `&` along with a theme object will modify the global theme as well as the themes of the subplots. ```{r} p34 & theme_gray(base_family = "mono") @@ -173,7 +173,7 @@ p34 & theme_gray(base_family = "mono") Another type of annotation, known especially in scientific literature, is to add tags to each subplot that will then be used to identify them in the text and caption. ggplot2 has the `tag` element for exactly this and patchwork offers functionality to set this automatically using the `tag_levels` argument. -It can generate automatic levels in latin characters, arabic numerals, or roman numerals +It can generate automatic levels in latin characters, arabic numerals, or roman numerals. ```{r} p123 <- p1 | (p2 / p3)