作者:迷人的小刀 | 来源:互联网 | 2023-09-08 16:00
Iamusingveganlibrarytomakesomeplots,withthiscode:我使用纯素库来制作一些图,使用以下代码:raremax<-min
I am using vegan library to make some plots, with this code:
我使用纯素库来制作一些图,使用以下代码:
raremax <- min(colSums(mydata))
col <- palette()
lty <- c("solid", "dashed", "longdash", "dotdash")
pars <- expand.grid(col = col, lty = lty, stringsAsFactors = FALSE)
out <- with(pars[1:18, ], rarecurve(mydata, step = 100, sample = raremax,
cex =0.6, ylab="OTUs", label=F, col=col, lty=lty, lwd=2))
Then I add a legend using this code:
然后我使用以下代码添加图例:
legend("bottomright", names(mydata), col=pars[1:18,1], lty= pars[1:18,2],
lwd=2, cex=0.5, xjust=1, ncol=2, x.intersp=0.5, y.intersp=0.5, bg="white")
The resulting graph looks like this:
结果图如下所示:
I would like to reduce the space between legend columns, also reducing the size of the legend box, but I can't find a way to do that.
我想减少图例列之间的空间,也减少了图例框的大小,但我找不到办法做到这一点。
Anyone could provide me some help?
有人能给我一些帮助吗?
1 个解决方案