Learn R Programming

RFOC (version 2.0-02)

spline.arrow: Spline Arrow

Description

Given a set of points, draw a spline and affix an arrow at the end.

Usage

spline.arrow(x, y = 0, kdiv = 20, arrow = 1, length = 0.2, col = "black", thick = 0.01, headlength = 0.2, headthick = 0.1, code = 2, ...)

Arguments

x
vector, x-coordinates
y
vector, y-coordinates
kdiv
Number of divisions
arrow
style of arrow, 1=simple arrow, 2=fancy arrow
length
length of head
col
color of arrow
thick
thickness of arrow stem
headlength
length of arrow head
headthick
thickness of arrow head
code
code, 1=arrow on end of spline, 3=arrow on beginning.
...
graphical parameters for the line

Value

  • list of x,y coordinates of the spline and Graphical Side effects

Details

Can use either simple arrows or fancy arrows.

See Also

fancyarrows

Examples

Run this code
plot(c(0,1), c(0,1), type='n')


G=list()
G$x=c(0.1644,0.1227,0.0659,0.0893,0.2346,
0.3514,0.5518,0.7104,0.6887,0.6903,0.8422)
G$y=c(0.8816,0.8305,0.7209,0.6086,0.5372,
0.6061,0.6545,0.6367,0.4352,0.3025,0.0475)



spline.arrow(G$x, G$y)

Run the code above in your browser using DataLab