报错代码
data=read.table('scaffold_len&depth&GC.txt',header = T,sep = '\t')
png('test.png')
with(data,smoothScatter(GC_rate*100,Depth,ylim = c(0,200),xlab = 'GC%',ylab = 'Seq dep(X)'))
dev.off()
报错内容
Error in png("GC_depth_R.png") : X11 is not available
Execution halted
解决方案一
data=read.table('scaffold_len&depth&GC.txt',header = T,sep = '\t')
bitmap('test.png',"png16m")
with(data,smoothScatter(GC_rate*100,Depth,ylim = c(0,200),xlab = 'GC%',ylab = 'Seq dep(X)'))
dev.off()
解决方案二
生成PDF文件即可
data=read.table('scaffold_len&depth&GC.txt',header = T,sep = '\t')
pdf('test.pdf')
with(data,smoothScatter(GC_rate*100,Depth,ylim = c(0,200),xlab = 'GC%',ylab = 'Seq dep(X)'))
dev.off()