3D-plot of compositional data. The plot is mainly an exploratory tool, not intended for exact display of data.
# S3 method for acomp
plot3D(x, parts=1:min(ncol(X),4),...,
lwd=2, axis.col="gray", add=FALSE, cex=2,
vlabs=colnames(x), vlabs.col=axis.col, center=FALSE,
scale=FALSE, log=FALSE, bbox=FALSE, axes=TRUE, size=cex,col=1)
# S3 method for rcomp
plot3D(x,parts=1:min(ncol(X),4),...,
lwd=2,axis.col="gray",add=FALSE,cex=2,
vlabs=colnames(x),vlabs.col=axis.col,center=FALSE,
scale=FALSE,log=FALSE,bbox=FALSE,axes=TRUE,size=cex,col=1)
an aplus object to be plotted
a numeric xor character vector of length 3 coding the columns to be plotted
additional plotting parameters as described in
rgl.material
logical, adding or new plot
size of the plotting symbols
line width
color of the axis
the column names to be plotted, if missing defaults to the column names of the selected columns of X
color of the labels
logical, should the data be centered
logical, should the data be scaled
logical, indicating wether to plot in log scale
logical, whether to add a bounding box
logical, whether plot a coordinate cross
size of the plotting symbols
the color used for dots, defaults to black.
Called for its side effect of a 3D plot of an acomp object in an rgl plot. It invisibly returns the 3D plotting coordinates of the objects displayed
The routine behaves different when 3 or four components should be plotted. In case of four components:
If log is TRUE the data is plotted in ilr
coordinates. This is the isometric view of the data.
If log is FALSE the data is plotted in ipt
coordinates
and a tetrahedron is plotted around it if coors == TRUE
. This
can be used to do a tetrahedron plot.
In case of three components:
If log is TRUE the data is plotted in clr
coordinates. This can be used to visualize the clr plane.
If log is FALSE the data is plotted as is, showing the embedding of the three-part simplex in the three-dimensional space.
In all cases:
If coors
is true, coordinate arrows are plotted
of length 1 in the origin of the space, except in the tetrahedron case.
# NOT RUN {
data(SimulatedAmounts)
plot3D(acomp(sa.lognormals5),1:3,col="green")
plot3D(acomp(sa.lognormals5),1:3,log=TRUE,col="green")
plot3D(acomp(sa.lognormals5),1:4,col="green")
plot3D(acomp(sa.lognormals5),1:4,log=TRUE,col="green")
# }
Run the code above in your browser using DataLab