我想知道是否可以更改用 arrows()
绘制的箭头的箭头.我查看了文档,但我发现我可以更改行尾但不能更改箭头?
plot(c(1:10))
arrows(0,0,10,10)
任何帮助表示赞赏:)
最佳答案
如 ?arrow
中所述,您可以使用 length
和 angle
更改标准箭头的外观。与 lwd
你可以改变粗细,就像在lines()中一样。还有lty
工作,虽然结果往往不是很好。
一整套例子:
plot(c(0:10),type="n")
arrows(1,0,2,1,length=0.2,angle=20)
arrows(1,1,2,2,length=0.1,angle=40,lwd=3)
invisible(mapply(arrows,
rep(c(3,6),each=4),rep(3:6,2),
rep(c(5,8),each=4),rep(5:8,2),
angle=seq(10,40,length.out=8),
length=rep(seq(0.1,0.3,length.out=4),2),
lwd=rep(1:4,each=2))
)
关于r - 更改箭头的箭头(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5731432/