我使用R生成了一个RDA图。当我将我的双标图添加到RDA时,它添加了我想要关闭的新轴。以下是一些示例数据:
Site<-c(1,2,3,4,5,6)
inv1<-c(34,67,78,45,677,23)
inv2<-c(45,5,55,56,7,8)
inv3<-c(6,7,4,12,7,8)
depth<-c(3,1,6,7,10,57)
exampledata_exp<-data.frame(Site,depth)
exampledata_invs<-data.frame(inv1,inv2,inv3)
dpRDA.out<-capscale(exampledata_invs~depth+Site, data=exampledata_exp, distance="bray")
summary(dpRDA.out)
plot(dpRDA.out, display=c("sites"), type="n", scaling=1, cex=1, family="serif")#this is the way I want the plot borders to look
points(dpRDA.out, display = c("sites"))
points(dpRDA.out, display="bp", col="black", scaling=1, family="serif")
最后一点代码添加了新轴。我尝试过axis = FALSE,xaxt =&#34; n&#34 ;, axes(side = 3,lwd = 0)。任何建议都非常感谢。
当前加载的库:
library(vegan)
library(reshape)
library(ggplot2)
library(plyr)
library(MASS)
library(tables)
library(matrixStats)
答案 0 :(得分:1)
您可以通过在最后一行将axis.bp参数设置为FALSE来关闭新轴。 尝试:
points(dpRDA.out, display="bp", col="black", scaling=1, family="serif", axis.bp = FALSE)