3

I am trying to create a series of publishable biplots of a PCA on insect abundance in different strata (tree canopy and understory) of forests. I am doing this using the rda() function. To create the plot, I am using vegan's biplot() function and do a couple of modifications to it:

Family=read.table("Family2.txt", header=T)
strata=read.table("Strata.txt", header=T)

family.pca=rda(Family)

with(strata, levels(Strata))

biplot(family.pca, type=c("text", "none"), col=c("black", "black"), xlab="", 
ylab="")
title(xlab="PC1 (86.8%)", ylab="PC2 (9.7%)", mgp=c(2.2, 2.2, 0))
points=c(16, 1)
colour=c("black", "black")
with(strata, points(family.pca, display = "sites", col = colour, pch = 
points))
with(strata, legend("topright", legend = levels(Strata), bty = "n", col = 
colour, pch = points, pt.bg = points))

The result is quite nice:

enter image description here

But because I will join several biplots to a bigger graph, the labels for the families (usually called 'species labels') are too small. I tried to change them using cex=1.5 in biplot(), but it seems to get overwritten by the defaults of the function. When I create an empty biplot frame by setting type=c("none", "none"), I can add bigger species labels using the text() function, e.g.

text(family.pca, display = "species", cex = 1.0, col = "black")

but then I don't know how to add the arrows to the plot (I would really like to have the arrows in there...).

Does anybody know of a solution for this case? Answers are greatly appreciated.

Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
Lukas
  • 31
  • 1
  • 4

1 Answers1

1

I recommend going to ?biplot you should see an explanation for the argument cex in the documentation. That should help you as it related to the labels of the plot and the size of these labels.

Leo Ohyama
  • 887
  • 1
  • 9
  • 26
  • 2
    This answer is not very helpful for the OP. I won't downvote, but recommend to take the time to make the answer more helpful...Better to leave such "answers" as comments. – Mikko Apr 29 '18 at 09:21
  • To add to this, it's not that straight forward: the cex argument for biplot seems to work in some instances such as prcomp (e.g. `biplot(prcomp(state.x77), cex=c(0.5,0.75))`) but doesn't work with others such as rda that @Lukas was using (e.g. `biplot(prcomp(state.x77), cex=c(0.5,0.75))`). Agree with @Mikko here, it'd be more useful to have a reproducible answer than recommending solutions that don't work. If I find a clear answer I'll update seperately. – Thomas Moore Jul 15 '21 at 01:00