好的,所以我在这里得到了一些代码来绘制人口动态图,我希望在曲线的每个“末端”,在 x 和 y 轴上写一个特定的值,如下所示:https:// images.ecosia.org/EIQKP81uukSNIVwegG9q5w1xhmM=/0x390/smart/https%3A%2F%2Fwww.webpages.uidaho.edu%2Fwlf448%2Fimages%2Fstableb.gif
我首先尝试删除轴号,因为我不需要它们,但这里真正的问题是我有这些图的桶负载(有代码的循环版本,但我不会在这里显示它以保留它简单),我想自动添加这些值。
### Outcome study with isoclines
#Clearing workspace
rm(list=ls())
graphics.off()
#plot setup
#par(mfrow=c(2,2))
#Parameters
lambda1<- 3.2
lambda2<- 3
alphs <- matrix(c(0.005, 0.005, 0.0045, 0.004), ncol = 2, byrow = TRUE)
#Plotting isoclines
plot(0,0,type="l",xlab='N1',ylab='N2',col='blue',xlim =c(0,470),
ylim = c(0,750))
abline(a=((lambda1-1)/alphs[1,2]),b=(- alphs[1,1]/alphs[1,2]),col='blue')
abline(a=((lambda2-1)/alphs[2,2]),b=(- alphs[2,1]/alphs[2,2]),col='green')
legend("topright", legend = c("Species 1", "Species 2"),lty = 1,
col = c("blue", "green"), bty = "n")
arrows(x0 = 300, y0 = 600, x1 = 270, y1 = 600, length = 0.06,col="blue")
arrows(x0 = 300, y0 = 600, x1 = 300, y1 = 510, length = 0.06, col="green")
arrows(x0 = 50, y0 = 100, x1 = 80, y1 = 100, length = 0.06,col="blue")
arrows(x0 = 50, y0 = 100, x1 = 50, y1 = 190, length = 0.06, col="green")
老实说,我不知道会发生什么,但一定有办法做到这一点,对吧?