plot - unit length arrows() R -
wondering if there way make arrows unit length in r using function arrows(). doing following:
x0<- c(results_15[(1:3479),1]) y0<- c(results_15[(3479:1),2]) x1<- (x0 + c(results_m_cos_20[,9])) y1<- (y0 - c(results_m_sin_20[,9])) arrows(x0, y0, x1, y1, length = 0.1, angle = 25, code = 2, col = "black", lty = 1, lwd = 1, xpd=true)
results_m_cos , results_m_sin give me increases in x , y respectively, make arrows maintain same direction (so same cos:sin ratio), want arrows unit length. ideas on how this? or should using totally different function and/or package plot arrows?
Comments
Post a Comment