我的数据是这样的:
VariantClass PASS_ONTARGET
Silent 50.30
Missense 47.00
Nonsense 0.74
Startloss 0.26
Stoploss 0.74
Frameshift-indel 0.61
Inframe-indel 0.35
我生成饼图的代码是:
data <- read.table(file=Infilename, header=T, sep="\t")
png(filename=Outfilename,height=4000,width=5000,res=600)
y<-data$PASS_ONTARGET
color<-c("blue","green","light blue","orange","purple","red","yellow")
names<-c(data$VariantClass)
pie(y, labels=names, font=2, main="Variant Class Distribution", clockwise = FALSE, density = NULL, col = color, border = NULL, lty = NULL)
legend("topright",legend=names,cex=1.0, bty="n", fill=c(color))
dev.off()
我遇到的问题是图表上的标签相互重叠。我该如何防止这种情况?
答案 0 :(得分:4)