Making a labelled slope plot with the help of R's ggrepel and ggplot2 (CC313)
Автор: Riffomonas Project
Загружено: 7 нояб. 2024 г.
Просмотров: 581 просмотр
Pat uses ggplot2 and ggrepel to generate a labelled slope plot based on a similar plot showing survey sentiments for two groups of people. He customizes the appearance using pivot_longer, group_by, mutate, slice_max, geom_line, geom_vline, annotate, geom_text_repel, scale_x_discrete, scale_color_gradient2, coord_cartesian, labs, and theme. You can find the code he developed in this episode at https://www.riffomonas.org/code_club/.... The newsletter describing how I would go about generating the figure can be found at https://shop.riffomonas.org/posts/che....
If you have a figure that you would like to see m-e discuss in a future newsletter and episode of Code Club, email me at [email protected]!
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!
/ 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/...
0:00 Introduction
2:25 Roughing in slope plot
8:23 Adding text to annotate each line
14:26 Moving y-axis inside labels
20:11 Coloring lines by difference in favorability
24:56 Finishing touches

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: