Displaying 1 result from an estimated 1 matches for "xcoor".
Did you mean:
xcoord
2009 Jan 19
2
plotting arrows with different colors and varying head size
...rvals into colors. On the contrary, I can't define different head sizes, because
the "length" argument in the "arrows()" function seems to control the head size of all the
arrows at once.
Any help will be greatly appreciated.
## Generate random data
set.seed(1)
xcoor <- matrix(runif(20), ncol=5)
ycoor <- matrix(runif(20), ncol=5)
u <- matrix(rnorm(20)/10, ncol=5)
v <- matrix(rnorm(20)/10, ncol=5)
## calculate arrows length and look histogram
arrowlen <- sqrt(u^2 + v^2)
hist(arrowlen)
## recode arrow lengths (by inte...