如何制作一个大而不是圆圈的点?
x0和y0只是具有1个值的列表.
所以这只是绘制一个值:
points(x=x0,y=y0,col="green",pch=16)
Run Code Online (Sandbox Code Playgroud)
但是这个圆圈有点小,它的颜色也很明显.
要使单个绘图字符更大,请使用cex,如:
points(x = x0, y = y0, col = "green", pch = 16, cex = 10)
Run Code Online (Sandbox Code Playgroud)
请阅读(尽管有点乏味)?par基本图形选项.
编辑
我想我应该添加(即使我同意这个问题大多是重复的),你的问题的第二部分只需要一个不同的值pch.听起来像pch = 1你想要的,但你可以通过看到很多选项example("points").
根据你想要的圆圈大小,你也可以考虑这个symbols()功能.
## from ?symbols
N <- nrow(trees)
with(trees, {
## Girth is diameter in inches
symbols(Height, Volume, circles = Girth/24, inches = FALSE,
main = "Trees' Girth") # xlab and ylab automatically
})
Run Code Online (Sandbox Code Playgroud)
