There are several issues here:
- capitalization and
- scaling biplot scores according to
plot.cca
The latter does not really matter if you only plot points, but a general solution to this type of conspiracy requires us to take into account that other ratings may also be required for drawing.
Here's a reproducible example using data embedded in
library('vegan') data(varespec, varechem)
Now we are approaching a foolish ordination (do not do this at home)
ord <- rda(varespec ~ ., data = varechem)
Then get points
bp <- scores(ord, display = 'bp')
and suppose we have a variable containing the groups that we want to assign to each bipole value
f <- factor(sample(1:5, nrow(bp), replace = TRUE))
and the related color vector we want to use
cols <- c('red','black','green','navy','purple')
and expand this color vector into one of the long nrow(bp) , i.e. one color for one point / variable
cols <- cols[f]
Then start drawing by preparing an empty plot area in which we can add arrows
plot(ord, type = 'n')
In the above example, we leave the given plot area in such a way that takes into account the types and evaluation of the site / selection.
Now we calculate the factor that allows the ballogs to occupy the specified proportion ( fill = 0.75 ) of the chart area
mul <- ordiArrowMul(bp, fill = 0.75)
Finally, add biplot arrows colored according to their group
arrows(0, 0, mul * bp[,1], mul * bp[,2], length = 0.05, col = cols)
and add tags to biplot arrows
labs <- rownames(bp) text(ordiArrowTextXY(mul * bp, labs), labs, col = cols)
It creates
