segments: Draws straight lines from point to point.

Description Usage Arguments Details Author(s) See Also Examples

Description

The function draws lines from a points x to a point y in the given geometry.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
          
          ## S3 method for class 'acomp'
segments(x0,y,...,steps=30,aspanel=FALSE)
          ## S3 method for class 'rcomp'
segments(x0,y,...,steps=30,aspanel=FALSE)
          ## S3 method for class 'aplus'
segments(x0,y,...,steps=30,aspanel=FALSE)
          ## S3 method for class 'rplus'
segments(x0,y,...,steps=30,aspanel=FALSE)
          ## S3 method for class 'rmult'
segments(x0,y,...,steps=30,aspanel=FALSE)
          

Arguments

x0

dataset of points (of the given type) to draw the line from

y

dataset of points (of the given type) to draw the line to

...

further graphical parameters

steps

the number of discretisation points to draw the segments, since the representation might not visually be a straight line

aspanel

Logical, indicates use as slave to do acutal drawing only.

Details

The functions add lines to the graphics generated with the corresponding plot functions.

Adding to multipaneled plots redraws the plot completely, and is only possible when the plot has been created with the plotting routines from this library.

Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

See Also

plot.acomp,lines.acomp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(SimulatedAmounts)

plot(acomp(sa.lognormals))
segments.acomp(acomp(c(1,2,3)),acomp(c(2,3,1)),col="red")
segments.rcomp(acomp(c(1,2,3)),acomp(c(2,3,1)),col="blue")

plot(aplus(sa.lognormals[,1:2]))
segments.aplus(aplus(c(10,20)),aplus(c(20,10)),col="red")
segments.rplus(rplus(c(10,20)),rplus(c(20,10)),col="blue")

plot(rplus(sa.lognormals[,1:2]))
segments.aplus(aplus(c(10,20)),aplus(c(20,10)),col="red")
segments.rplus(rplus(c(10,20)),rplus(c(20,10)),col="blue")


Search within the compositions package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.