【发布时间】:2015-12-31 17:02:28
【问题描述】:
我想用 IDPmisc 或其他库在对数 r 图中绘制实心箭头。箭头以对数方式拉伸。
一个简单的例子(文档例子稍作修改)是:
library(IDPmisc)
plot(c(4,10), c(0,10), type="n",log = "x")
Arrows(5, 5, 5,10, size=3,
sh.lwd=5, sh.lty=2,
h.lwd=5)
Arrows(5, 5, 7.5, 9, size=3, open=TRUE,
sh.adj=0.7, sh.lwd=5, sh.lty=2,
h.col.bo="red",h.lwd=5)
Arrows(5, 5, 9, 7.5, size=3, open=FALSE,
sh.adj=1, sh.lwd=5, sh.col="blue",
h.col.bo="red",h.lwd=2)
Arrows(5, 5, 10, 5, size=2.5, width=1.5, open=FALSE,
sh.adj=1, sh.lwd=7, sh.col="blue")
我尝试定义一个新的 Arrows.log(就像它已完成 here)并更改角度:
deg.arr <- c(atan2(y.arr, exp(x.arr)), NA)
theta <- atan2((y2 - y1) * uin[2], exp((x2 - x1)) * uin[1])
但它不起作用(我没有完全理解 Arrows 函数)并且已经遇到了 Arrows 中使用的 xyinch() 函数的问题。
如果您建议一种简单的方法来在对数图中绘制带有实心箭头的漂亮箭头,而无需重新定义 IDPmisc 箭头,我会很高兴。
【问题讨论】: