powered by
Graphics utility functions to draw vectors from an origin to a collection of points (using arrows in 2D or lines3d in 3D) with labels for each (using text or texts3d).
arrows
lines3d
text
texts3d
vectors( x, origin = c(0, 0), labels = rownames(x), scale = 1, col = "blue", lwd = 1, cex = 1, length = 0.1, angle = 13, pos = NULL, ... )
None
A two-column matrix or a three-column matrix containing the end points of the vectors
Starting point(s) for the vectors
Labels for the vectors
A multiplier for the length of each vector
color(s) for the vectors.
line width(s) for the vectors.
For vectors, length of the edges of the arrow head (in inches).
vectors
For vectors, angle from the shaft of the arrow to the edge of the arrow head.
For vectors, position of the text label relative to the vector head. If pos==NULL, labels are positioned labels outside, relative to arrow ends.
pos==NULL
other graphical parameters, such as lty, xpd, ...
lty
xpd
Michael Friendly
The graphical parameters col, lty and lwd can be vectors of length greater than one and will be recycled if necessary
col
lwd
arrows, text, segments
segments
lines3d, texts3d
plot(c(-3, 3), c(-3,3), type="n") X <- matrix(rnorm(10), ncol=2) rownames(X) <- LETTERS[1:5] vectors(X, scale=2, col=palette())
Run the code above in your browser using DataLab