Error in inherits(x, "theme") : argument "e2" is missing, with no default

在Rstudio中运行代码

p<-ggplot(outfile,aes(x = type,y = log2FoldChange))+geom_bar(stat = 'identity',fill='#FF9999')+geom_text(label=sig,colour='blue',vjust=1,check_overlap = TRUE,size=7)
+theme(axis.text = element_text(size=14))

出现错误

Error in inherits(x, "theme") : argument "e2" is missing, with no default

这是因为+位于开头了,导致theme()语句无法与上一语句衔接,只需把+放在上一语句的末尾

posted @ 2018-04-11 12:15  ZzzzHong  阅读(1624)  评论(0编辑  收藏  举报