Learn R Programming

pavo (version 1.0.0)

tetraplot: Plot a static tetrahedral colorspace

Description

Produces a static 3D tetrahedral plot.

Usage

tetraplot(tcsdata, vertexsize = 0.8, achro = TRUE, achrosize = 0.8, achrocol = "grey", out.lwd = 1, out.lcol = "darkgrey", view = 70, scale.y = 1, axis = FALSE, grid = FALSE, xlim = c(-1.22, 0.612), ylim = c(-0.35, 0.707), zlim = c(-0.25, 0.75), margin = c(1, 1, 1, 1), ...)

Arguments

tcsdata
(required) a data frame, possibly a result from the colspace function, containing values for the 'x', 'y' and 'z' coordinates as columns (labeled as such).
vertexsize
size of the points at the vertices (defaults to 0.8).
achrosize
size of the point in the achromatic center (defaults to 0.8).
achrocol
color of the point in the achromatic center (defaults to 'grey').
out.lwd, out.lcol
graphical parameters for the tetrahedral outline.
view
orientation of the tetrahedron in degrees (defaults to 70).
scale.y
numeric. Perspective scaling of the y axis (defaults to 0.45).
axis
logical. Draw X, Y and Z axis (defaults to FALSE).
grid
logical. Draw grid (defaults to FALSE).
xlim, ylim, zlim
axis limits.
margin
vector of four numbers specifying drawing margins (defaults to c(1, 1, 1, 1)).

Value

tetraplot creates a 3D plot using functions of the package scatterplot3d.

References

Stoddard, M. C., & Prum, R. O. (2008). Evolution of avian plumage color in a tetrahedral color space: A phylogenetic analysis of new world buntings. The American Naturalist, 171(6), 755-776.

Endler, J. A., & Mielke, P. (2005). Comparing entire colour patterns as birds see them. Biological Journal Of The Linnean Society, 86(4), 405-431.

See Also

spheres3d,rgl.postscript, rgl.snapshot,rgl.material

Examples

Run this code
## Not run: 
# 
# # For plotting
# data(sicalis)
# vis.sicalis <- vismodel(sicalis, visual = 'avg.uv')
# tcs.sicalis <- colspace(vis.sicalis, space = 'tcs')
# plot(tcs.sicalis)
# 
# ## End(Not run)

Run the code above in your browser using DataLab