Using the patchwork R package to combine two ggplot2 plots into one figure (CC166)

November 24, 2021 • PD Schloss • 1 min read

The patchwork R package is a powerful tool for combining multiple plots into one figure. In this Code Club, Pat will show viewers how to use patchwork to combine a dot chart and barbell chart he creates using ggplot2 into a single figure. Along the way he’ll discuss how to give the figure a common title and how to apply a theme across the figure to make an attractive data visual. The question he is trying to answer with these plots is whether people’s stated intention to receive the COVID-19 vaccine in October 2020 matched whether they actually received the vaccine as of October of 2021. He’ll demonstrate how to build these figures generated using data from Ipsos and Our World in Data that describes COVID-19 vaccination intention and rates by country and day.


You can browse the state of the demo at the

comments powered by Disqus