做了一个比较喜欢的图

代码如下
setwd("D:/迅雷下载/FST作图/")
library(ggplot2)
qtl <- read.csv("33-GG值.csv",header = T)
ggplot(qtl, aes(x = qtl$pos, y = qtl$G)) +geom_point(colour="#ff7b42",size=2,pch=20)+geom_smooth(mapping=aes(x=qtl$pos,y=qtl$GG),data=qtl,span = 0.1,col="#1e14ff",size=1.3,se=FALSE)+xlab('chr33(bp)')+ylab("G-statistic")+geom_hline(aes(yintercept=quantile(qtl$GG, 0.95)),col="#e00017",lty=2,lwd=0.1)+geom_vline(xintercept = 959744,lty=2)+geom_vline(xintercept = 1105486,lty=2)+theme(panel.background=element_rect(fill='transparent', color='white'),panel.border = element_blank(),axis.line = element_line(colour = "black"))
网友评论