Добавить
Уведомления

Rotating axis labels in R to improve plot readability (CC094)

The original video is available on https://www.youtube.com/watch?v=VNYpVwUMQ2o Rotating axis labels in R can be important if your category labels are so long that they overlap with each other. But what's the best way to rotate the axis labels with R's ggplot syntax? In this episode of Code Club Pat will use a variety of approaches for dealing with unruly axis labels including the angle argument in element_markdown, element_text, and guide_axis, the n.dodge argument in guide_axis, and flipping your axes using flip_coord. Pat will use RStudio and functions from the #ggplot2 package including #coord_flip, #guide_axis, and other packages from the tidyverse. The accompanying blog post can be found at https://www.riffomonas.org/code_club/.... Do you have a figure that you would like to receive a critique or help improving? Let me know and I'd be happy to arrange a guest appearance! If you're interested in taking an upcoming 3 day R workshop, email me at riffomonas@gmail.com! R: https://r-project.org RStudio: https://rstudio.com Raw data: https://github.com/riffomonas/raw_dat... Workshops: https://www.mothur.org/wiki/workshops 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/ 0:00 Introduction 2:09 Rotating labels with element_text/element_markdown and guide_axis 4:31 Dodging labels to different lines 5:27 Adding line breaks to labels 6:48 Switching coordiantes with coord_flip 8:40 Cleaning up appearance of flipped figure 11:27 Changing position of x-axis to top 13:19 Refactoring code to remove coord_flip 15:47 Critique of figure 18:28 Conclusion

Иконка канала Learn American English
78 подписчиков
12+
1 просмотр
месяц назад
12+
1 просмотр
месяц назад

The original video is available on https://www.youtube.com/watch?v=VNYpVwUMQ2o Rotating axis labels in R can be important if your category labels are so long that they overlap with each other. But what's the best way to rotate the axis labels with R's ggplot syntax? In this episode of Code Club Pat will use a variety of approaches for dealing with unruly axis labels including the angle argument in element_markdown, element_text, and guide_axis, the n.dodge argument in guide_axis, and flipping your axes using flip_coord. Pat will use RStudio and functions from the #ggplot2 package including #coord_flip, #guide_axis, and other packages from the tidyverse. The accompanying blog post can be found at https://www.riffomonas.org/code_club/.... Do you have a figure that you would like to receive a critique or help improving? Let me know and I'd be happy to arrange a guest appearance! If you're interested in taking an upcoming 3 day R workshop, email me at riffomonas@gmail.com! R: https://r-project.org RStudio: https://rstudio.com Raw data: https://github.com/riffomonas/raw_dat... Workshops: https://www.mothur.org/wiki/workshops 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/ 0:00 Introduction 2:09 Rotating labels with element_text/element_markdown and guide_axis 4:31 Dodging labels to different lines 5:27 Adding line breaks to labels 6:48 Switching coordiantes with coord_flip 8:40 Cleaning up appearance of flipped figure 11:27 Changing position of x-axis to top 13:19 Refactoring code to remove coord_flip 15:47 Critique of figure 18:28 Conclusion

, чтобы оставлять комментарии