Pat shows how to you can use some simple dplyr and ggplot2 functions to make a simple, but elegant and impactful figure. He uses factor and group_by, summarize, mutate from dplyr and geom_hline, geom_errorbar, geom_point, scale_y_log10, scale_color_manual, labs, theme_classic, and theme from ggplot2. His goal was to show you the minimal elements you would need to convert the default visual into something that would be publication quality. You can find the code he developed in this episode at https://www.riffomonas.org/code_club/2024-11-29-simple-barplot. The newsletter describing how I would go about generating the figure can be found at https://shop.riffomonas.org/posts/some-thoughts-on-how-to-recreate-a-descending-bar-plot-with-ggplot2.
If you have a figure that you would like to see me discuss in a future newsletter and episode of Code Club, email me at pat@riffomonas.org!
Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at https://shop.riffomonas.org/youtube to get practice problems, tips, and insights. If you're interested in purchasing a video workshop be sure to check out https://riffomonas.org/workshops/
Support Riffomonas by becoming a Patreon member!
https://www.patreon.com/riffomonas
You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/
If you want to cite this video, please consider citing https://journals.asm.org/doi/10.1128/mra.01310-22
0:00 Introduction
3:30 Generate dot plot version of figure
7:28 Modifying legend and x-axis with factors
10:13 Modifying appearance of y-axis
14:14 Modifying appearance of points
17:37 Moving and stylizing legend
24:11 Add line to indicate limit of detection
25:31 Modifying text on x-axis
27:42 Using a different color scheme