2.2.Plot with R
Method 1: Use Rstudio
Method 2: Use R in Docker
(a) Use R in a Docker container
(b) load data, install & library packages
Prepare output directory
Load data
Install R packages
Import R packages
(c) Save & view the plot
1) Box plots
1a) Basic box plot

1b) Change continuous color by groups

1c) Grouped boxplots

1d) Boxplot with statistical test

2) Violin plots
2a) Basic violin plot

2b) Add summary statistics on a violin plot
(2b.1) Add median and quartile


(2b.2) Add mean and standard deviation


2c) Change violin plot fill colors

3) Histogram plots
3a) Basic histogram plot

3b) Add mean line on a histogram plot

3c) Change histogram plot fill colors

4) Density plots
4a) Basic density

4b) Add mean line on a density plot

4c) Change density plot fill colors
4d) Change fill colors

4e) Change line colors

4f) Combine histogram and density plots

5) Dot plots
5a) Basic dot plots

5b) Add mean and standard deviation


5c) Change dot colors

5d) Change dot colors, shapes and align types

6) Scatter plots
6a) Basic scatter plots

6b) Add regression lines and change the point colors, shapes and sizes

6c) Scatter plot with statistical test

6d) Multiple correlation plot

7) Volcano plots

8) Manhattan plots

9) Heatmaps
9a) gplots package: heatmap.2()
heatmap.2()
9b) pheatmap package: pheatmap()

9c) ggplot2 package

10) Ballon plots
10a) basic ballon plots

10b) change the dot colors

11) Vennpie plots

12) Colored Bar plot for GO results


13) Combined barplot

14) Stacked barplot

15) Radar plot

16) More Reading
Last updated
Was this helpful?