Call the arrows
function using relative (0:1) coordinates.
addArrows(x1, y1, x2, y2, ...)
x-coordinate (0:1) at base of arrow.
y-coordinate (0:1) at base of arrow.
x-coordinate (0:1) at tip of arrow.
y-coordinate (0:1) at tip of arrow.
additional parameters for the function arrows
.
Jon T. Schnute, Pacific Biological Station, Fisheries and Oceans Canada , Nanaimo BC
Lines will be drawn from (x1[i],y1[i])
to (x2[i],y2[i])
addLabel
, addLegend
local(envir=.PBSmodEnv,expr={
oldpar = par(no.readonly=TRUE)
tt=seq(from=-5,to=5,by=0.01)
plot(sin(tt), cos(tt)*(1-sin(tt)), type="l")
addArrows(0.2,0.5,0.8,0.5)
addArrows(0.8,0.95,0.95,0.55, col="#FF0066")
par(oldpar)
})
Run the code above in your browser using DataLab