0
我想用IDPmisc或其他庫在對數r圖中繪製滿的箭頭。箭頭以對數形式伸展。如何使用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])
但它沒有工作(我完全不理解箭頭函數),並且已經在箭頭中使用了xyinch()函數。
如果你建議一個簡單的方法在對數圖中繪製漂亮的箭頭,而不用重新定義IDPmisc箭頭,我會很高興。