-1

I've generated a plot of an RDA using R. When I add my biplot on to the RDA, it adds new axes that I would like to turn off. Here is some example data:

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") 

The last bit of code adds on a new axes. I have tried axes=FALSE, xaxt="n", axes(side=3, lwd=0). Any suggestions greatly appreciated.

libraries currently loaded:

library(vegan)
library(reshape)
library(ggplot2)
library(plyr)
library(MASS)
library(tables)
library(matrixStats)
Roman Luštrik
  • 69,533
  • 24
  • 154
  • 197
lken
  • 29
  • 7
  • Please provide the necessary code/data to create `dpRDA.out` http://stackoverflow.com/help/mcve – Hack-R Jul 20 '16 at 21:51
  • You didn't mention what libraries you have loaded and you must have more than one because `display` and `scaling` are not normally options to `plot`... – Hack-R Jul 20 '16 at 22:10
  • Thanks. Please add those to your question. Not `rda`? – Hack-R Jul 20 '16 at 22:14
  • You just deleted what little code you had. Please review StackOverflow's *requirement* of a reproducible example for this type of question. You now have 2 close votes. Your question will likely be closed if you don't fix it. – Hack-R Jul 20 '16 at 22:38
  • Thanks Hack-R, I think this is better explained now. – lken Jul 20 '16 at 23:02

1 Answers1

1

You can switch off the new axes by setting the axis.bp parameter to FALSE in the last line. Try:

points(dpRDA.out, display="bp", col="black", scaling=1, family="serif", axis.bp = FALSE)
Tamas Nagy
  • 1,001
  • 12
  • 22