Learn R Programming

TaoTeProgramming (version 1.0)

treeColor: Draw trees

Description

Draw trees.

Usage

treeColor(branches = 30, trunkColor = NULL, branchColor = NULL, seed = NULL) tree(branches = 30, seed = NULL)

Arguments

branches
integer giving the number of branches.
trunkColor
a vector of colors, the default is the browns.
branchColor
a vector of colors, the default is the greens.
seed
an integer giving the argument for set.seed.

Value

nothing useful.

Side effects

create a plot on the current graphics device, and modify the random seed.

References

http://www.burns-stat.com/documents/books/tao-te-programming/

See Also

canvas, set.seed.

Examples

Run this code
# a specific picture
treeColor(seed=7)
# different each time
treeColor()

Run the code above in your browser using DataLab