我想在下图中的每行中添加标签:
a <- 1:2000
b <- a - a[1]
plot(1, type = "n", xlab = "Scale parameter", ylab = "No. of days", xlim = c(0, 90), ylim = c(0, 150))
shape.range <- seq(from = 2, to = 10, by = 1)
scale.range <- seq(from = 10, to = 70, by = 1)
for(sh in seq_along(shape.range)){
sh.ref <- shape.range[sh]
for(sc in seq_along(scale.range)){
sc.ref <- scale.range[sc]
p <- 1 - exp(-(b/sc.ref)^sh.ref)
p.l <- which.max(p >= 0.97)
points(sc.ref, p.l, cex = 0.5, pch = 19)
# text(80, # how to insert the value of y here such that the label ends up at the end of the each line, labels = paste0(sh.ref))
}
}