r - 将文本添加到指定位置的绘图
问题描述
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))
}
}
解决方案
推荐阅读
- python - Selenium 无效参数:无效的“sameSite”
- apache-kafka - 在通过 CamelKafkaAzureBlobSink 连接器的每条记录上附加一个换行符
- reactjs - 无法从反应前端与 Django 休息框架后端访问对象的“实例”或详细视图
- javascript - 如何在javascript中组合两个数组?
- mysql - 错误 2059 (HY000):无法加载身份验证插件“caching_sha2_password”:找不到指定的模块
- graph - 如何在处理中制作滚动图?
- c# - 在 URL 中给定枚举参数时找不到 404 错误
- python - 如何在 Keras 中实现这种非全连接结构?
- c# - 消息:非静态方法需要一个目标。- 单元测试 C#
- oracle - 将所有用户表的读取权限授予oracle中的新用户