如何解决ggbiplot的ggarrange鸡蛋包的几个问题
我在使用 ggarrange 的 ggbiplot 函数时遇到了几个问题。这是我的两个情节
content.hemi.graph<-ggbiplot(content.hemi.PCA,groups=data.hemi$root.exclusion,ellipse=TRUE)+
theme_bw()+
xlim(c(-2,3))+
ylim(c(-2,3))+
theme(panel.grid.major = element_blank(),panel.grid.minor = element_blank(),# panel.border = element_blank(),text = element_text(size = 10),title = element_text(size = 10),axis.title.y = element_blank(),axis.ticks.y = element_blank(),legend.position = "none",legend.title = element_blank())+
scale_color_manual(name = "",values = c("red","blue"),labels = c("unattached","attached"))+
labs( x = "Comp 1 ",y = "Comp 2",title = "Content") ; content.hemi.graph
#AND
data.hemi$species.exclusion <- paste(data.hemi$leaf.species,concen.hemi$root.exclusion)
concen.hemi.graph<-ggbiplot(concen.hemi.PCA,ellipse=TRUE)+ theme_bw()+
xlim(c(-2,legend.title = element_blank())+
scale_color_manual(name = "","blue"))+
labs( x = "Comp 1 ",title = "Concentration");concen.hemi.graph
graph.hemi <- egg::ggarrange(concen.hemi.graph,content.hemi.graph,ncol = 2,nrow = 1)+
ggsave("figures/paper/hemiPCA.tiff"); graph.hemi
如果我使用 ggpubr 而不是 egg,它工作正常,但图形不对齐。不过,有了鸡蛋,我收到了这个警告
"鸡蛋错误::ggarrange(concen.hemi.graph,ncol = 1) + : 二元运算符的非数字参数"
问题#2 是我似乎无法让向量不重叠在第二张图像上,即使我输入了 loadings.repel = TRUE,或任何其他应该解决这个问题的命令。 看下面的例子
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。