search for: lenxy

Displaying 1 result from an estimated 1 matches for "lenxy".

Did you mean: lenny
2011 Dec 07
2
How to scale arrows to approximately fill a plot region?
...t;max"),c("x", "y"))) # center vectors here origin <- colMeans(bbox) points(origin[1], origin[2], pch=16, cex=2) # vectors to be displayed in this space vectors <- cbind( runif(5), (runif(5)-.5)) # draw arrows, given origin and length in xy Arrows <- function(xy, lenxy, length=.1, angle=10, ...) { arrows(xy[1], xy[2], xy[1]+lenxy[,1], xy[2]+lenxy[,2], length=length, angle=angle, ...) } ## How to determine scale so that vectors ~ fill the bounding box??? scale <- 14 Arrows(origin, scale*vectors) -- Michael Friendly Email: friendly AT york...