[英]How do I plot species number (specnumber()-function) with vegan package?
[英]How to change font size of species labels in vegan's biplot() function
我正在嘗試創建一系列關於不同森林(樹冠和林下層)中昆蟲豐度的PCA的可發布雙圖。 我正在使用rda()函數執行此操作。 為了創建圖,我使用了素食主義者的biplot()
函數並對它做一些修改:
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))
結果是相當不錯的:
但是,因為我將幾個雙折圖合並到一個更大的圖中,所以這些家庭的標簽(通常稱為“物種標簽”)太小。 我試圖在cex=1.5
biplot()
使用cex=1.5
更改它們,但是似乎被該函數的默認值覆蓋了。 通過設置type=c("none", "none")
創建空的Biplot框架時,可以使用text()
函數添加更大的種類標簽,例如
text(family.pca, display = "species", cex = 1.0, col = "black")
但是后來我不知道如何將箭頭添加到繪圖中(我真的很想在其中添加箭頭...)。
有人知道這種情況的解決方案嗎? 答案是極大的贊賞。
我建議轉到?biplot
cex
,您應該在文檔中看到參數cex
的解釋。 這將幫助您,因為它與圖的標簽和這些標簽的大小有關。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.