Перейти к содержимому

Using a log scale for an axis using the ggplot2 R packge (CC110)

Riffomonas Project

0:00 / 0:00

Using a log scale for an axis using the ggplot2 R packge (CC110)

3 923 просмотра · 5 лет назад
Riffomonas Project
27,5 тыс. подписчиков
3 923 просмотра · 5 лет назад
Scaling an axis with the log scale is straightforward to achieve in R with the scale_x_log10 (or scale_y_log10) and coord_trans functions from ggplot2. In this episode of Code Club, Pat will discuss these two sets of functions and when to use each to help accentuate the differences between gropus that have low abundances. He'll also add a line to indicate the limit of detection using geom_vline/geom_hline. Pat will use RStudio and the #scale_y_log10, #coord_trans, and scale_x_log10 functions from the #ggplot2, package. 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 4:03 Log scale 6:24 Fixing zeroes 10:42 scale_x_log10 vs coord_trans 15:46 Fixing threshold for which genera to show 17:03 Indicating the limit of detection 19:23 Fixing appearance of axis labels 20:48 Contrasting linear and log scales