March 14, 2021

Bookmarks: R data visualization, ggplot2 tips

Bookmarks for useful graphing tutorials in R. 

Types of plots possible with ggplot2

  • "Be awesome in ggplot2" - a visually beautiful guide to see what is possible. Great to get ideas for data visualization.

Formatting in general

Themes available for ggplot2 graphs

Modifying color, font, text size in ggplot2

Creating custom themes for ggplot2

Add subscripts, Greek letters, and other special characters to graph legends
Useful to add subscripts in axes, e.g. log10(FDR)

Adding annotations to plots


Formatting x- and y-axes


geom_tile() for matrix data - heatmap


Fix label spacing in ggplot2 with ggrepel -- install.packages("ggrepel")
Use the R package, ggrepel, to add point label text that doesn't overlap.
Use functions ggrepel::geom_label_repel for boxed labels
Use function ggrepel::geom_text_repel for just text, no background

Ideas with ggrepel:
https://stackoverflow.com/questions/15624656/label-points-in-geom-point

Make an animated gif to better see point labels, with ggrepel:
https://mran.microsoft.com/snapshot/2017-02-28/web/packages/ggrepel/vignettes/ggrepel.html

Making a color gradient to label points, and formatting the legend
https://stackoverflow.com/questions/24265652/label-minimum-and-maximum-of-scale-fill-gradient-legend-with-text-ggplot2


Color code outliers in a box and whisker plot by a specific variable

Heatmaps


Combining figures




Cowplot R package

Making pdf files

Bookmarks: single cell RNA-seq tutorials and tools

These are my bookmarks for single cell transcriptomics resources and tutorials. scRNA-seq introductions How to make R obj...