跑代码时卡顿、电脑不给力让人抓狂!找果叔试用稳定高速的服务器,让分析顺畅无比!
代码学不会?bug 频繁出现,束手无策?实操生信分析课程赶快学起来!滴滴果叔领取体验课程哦~
线上课程教学
课题设计、定制生信分析
云服务器租赁
加微信备注99领取使用
#安装与调用包
install.packages('ggridges')
library(ggridges)
library(ggplot2)
library(RColorBrewer)
#读入数据
data <- read.table('输入数据.txt',sep = '\t',header = 1)
head(data)
P1 <- ggplot(data, aes(x = value, y = location)) +
geom_density_ridges(aes(fill = location))
P1
P2 <- ggplot(data, aes(x = value, y = location)) +
geom_density_ridges(aes(fill = location)) +
scale_fill_manual(values = c("#00AFBB", "#E7B800", "#FC4E07",'black', 'red'))
P2
P3 <- ggplot(data, aes(x = value, y = location)) +
geom_density_ridges(aes(fill = location)) +
scale_fill_manual(values = c(brewer.pal(5,'Set3')))
P3
P4 <- ggplot(data,aes(x = value, y = location)) +
geom_density_ridges_gradient(aes(fill = ..x..),
scale = 1.5,
rel_min_height = 0.01) +
scale_fill_gradientn(
colours = c("#0D0887FF", "#CC4678FF", "#F0F921FF"),
name = "value"
)+
labs(title = 'Microbial populations in different locations')
P4
P5 <- ggplot(data,aes(x = value, y = location)) +
geom_density_ridges_gradient(aes(fill = ..x..),
scale = 1.5,
rel_min_height = 0.01,
jittered_points = TRUE,
alpha = 0.5,
point_size = 1.3) +
scale_fill_gradientn(
colours = c("#0D0887FF", "#CC4678FF", "#F0F921FF"),
name = "value"
)+
labs(title = 'Microbial populations in different locations') +
theme_bw()
P5
果叔还提供思路设计、定制生信分析、文献思路复现;有需要的小伙伴欢迎直接扫码咨询果叔,竭诚为您的科研助力!
定制生信分析
服务器租赁
扫码咨询果叔
往期回顾
01 “made in China”嘎嘎好用!中国人自己的数据库就是香!暨南大学:CHARLS+Cox回归分析,8.5分信手拈来超牛! |
02 |
03 IF=58.7,这泼天的多组学富贵可得接住!系统生物学研究团队开挂思路,机器学习助力个性化医疗,你就学吧,一看一个不吱声! |
04 |