straightarrow {diagram} | R Documentation |
Plots straight line between two points
adds an arrowhead at a certain distance
straightarrow(from, to, lwd=2, lty=1, lcol="black", arr.pos=0.5, endhead=FALSE, ...)
from |
coordinates (x,y) of the point *from* which to draw arrow |
to |
coordinates (x,y) of the point *to* which to draw arrow |
lwd |
line width |
lty |
line type |
lcol |
line color |
arr.pos |
relative position of arrowhead |
endhead |
if TRUE: the arrow line stops at the arrowhead; default =FALSE |
... |
arguments passed to function Arrows |
a straight arrow is drawn between the points '(from, to)' The position of the arrowhead, is set with arr.pos, a value between 0(start point) and 1(endpoint)
The type of the arrowhead is set with "arr.type" which can take the values:
see Arrowhead
from package shape for details on arrow head
coordinates (x,y) where arrowhead is drawn
Karline Soetaert <k.soetaert@nioo.knaw.nl>
bentarrow
, segmentarrow
, curvedarrow
selfarrow
, splitarrow
, treearrow
,
arrows
: the comparable R function,
Arrows
: more complicated arrow function from package shape
openplotmat(main="straightarrow") pos <-coordinates(c(2,3,1)) for (i in 1:5) straightarrow(from=pos[i,],to=pos[i+1,],arr.pos=0.5) for (i in 1:6) textrect(pos[i,],lab=LETTERS[i],radx=0.05)