HI there!!!
I have generated the following curve by using the following codes (using vegan package). I want to add a legend for the two curves. Pink as "control" and green as "test". How can I do this?
My code:
curve_test <- specaccum(test, method = "random")
curve_test
summary(curve_test)
plot(curve_test, ci.type="bar", col="blue", lwd=2, ci.lty=0, xlab = "Sample size", ylab = "Species number")
boxplot(curve_test, col="hotpink", add=TRUE, pch="+")
curve_control <- specaccum(control, method = "random")
curve_control
summary(curve_control)
plot(curve_control, add = TRUE, ci.type="bar", col="red", lwd=2, ci.lty=0)
boxplot(curve_control, col="lightgreen", add=TRUE, pch="+")
title(main = "Species accumulation curve of rarefied data")
This is the curve generated:
Can anyone please help me?
Thanks,
DC