Now, on p1 play around with the angle, hjust, vjust, and face arguments.
# insert code here
Now, let’s use the functions within patchwork to help manipulate the format of these plots in our document. Let’s start by adding p1 and p2 together in the chunk below. Let’s render the document and see what happens.
We used the + sign above to put plots next to each other. We can also use the | sign. We can use the / sign to stack plots. Let’s create a grid of our plots that has p1 on top and the other two on the bottom.
patchwork<-p1/(p2+p3)
Assume now that you want to add theme_bw to each plot. p1, p2, and p3 are still treated as ggplot objects. However, instead of adding theme_bw to each plot, let’s save our above code as patchwork and add theme_minimal to that!
Often, especially in scientific literature, multiple plots are collected in a single figure and referred to by a tag. We can use plot_annotation and tag_levels to do this. See the following code below: