R语言中points 函数
001、R语言中points 函数
plot(1:5, 1:5, xlim = c(1,6), ylim = c(1,6), type = "n")
points(c(3,3), c(2,5), cex = 2, col = "red", pch = 13)
002、 调整大小、颜色
plot(1:5, 1:5, xlim = c(1,6), ylim = c(1,6), type = "n")
points(c(3,3), c(2,5), cex = c(1,5), col = c("red", "cyan"), pch = 16)
003、矩阵生成
plot(1:5, 1:5, xlim = c(0,6), ylim = c(0, 6), type = "n") idx = 0 for (i in 1:5) { for (j in 1:5) { idx = idx + 1 points(i, j, pch = idx, cex = 1.5, col = "magenta") text(i,j, labels = idx, pos = 3, offset = 1) } }
004、设置形状的填充色,只有pch的21-25才有填充色
plot(1:5, 1:5, xlim = c(0,6), ylim = c(0, 6), type = "n") idx = 0 for (i in 1:5) { for (j in 1:5) { idx = idx + 1 points(i, j, pch = idx, cex = 1.5, bg = "magenta") text(i,j, labels = idx, pos = 3, offset = 1) } }
。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
2024-02-25 linux 中 du -sh 和 du -ch的区别
2024-02-25 linux 中输出指定目录下所有一级目录的大小以及磁盘占用最大的目录
2023-02-25 ubuntu 22.04中配置静态IP
2023-02-25 linux 中 sed命令中的q选项
2023-02-25 linux 中awk命令 制定 输入行分隔符、列分割符、输出行分隔符、输出列分隔符的几种方法
2023-02-25 linux 命令行中 几个高效快捷键
2021-02-25 python中字典的键不允许重复