lines {compositions} | R Documentation |
Draws connected lines from point to point.
Description
Functions taking coordinates given in various ways and joining the corresponding points with line segments.
Usage
## S3 method for class 'acomp'
lines(x,...,steps=30,aspanel=FALSE)
## S3 method for class 'rcomp'
lines(x,...,steps=30,aspanel=FALSE)
## S3 method for class 'aplus'
lines(x,...,steps=30,aspanel=FALSE)
## S3 method for class 'rplus'
lines(x,...,steps=30,aspanel=FALSE)
## S3 method for class 'rmult'
lines(x,...,steps=30,aspanel=FALSE)
Arguments
x |
a dataset of the given type |
... |
further graphical parameters |
steps |
the number of discretisation points to draw the segments, which might be not visually straight. |
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.
For the rcomp/rplus geometries the main problem is providing a function
that reasonably works with lines leaving the area. We tried to use a
policy of cuting the line at the actual borders of the (high
dimensional) simplex. That can lead to very strange visual impression
showing lines ending somewhere in the middle of the plot. However these
lines actually hit some border of the simplex that is not shown in the
plot. A hyper dimensional tetrahedron is even more difficult to imagin
than a hyperdimensional cube.
Author(s)
K.Gerald v.d. Boogaart http://www.stat.boogaart.de, Raimon Tolosana-Delgado
See Also
Examples
data(SimulatedAmounts)
plot(acomp(sa.lognormals))
lines(acomp(sa.lognormals),col="red")
lines(rcomp(sa.lognormals),col="blue")
plot(aplus(sa.lognormals[,1:2]))
lines(aplus(sa.lognormals[,1:2]),col="red")
lines(rplus(sa.lognormals)[,1:2],col="blue")
plot(rplus(sa.lognormals[,1:2]))
tt<-aplus(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="red")
tt<-rplus(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="blue")
tt<-rmult(sa.lognormals[,1:2]); ellipses(mean(tt),var(tt),r=2,col="green")