Learn R Programming

TaoTeProgramming (version 1.0)

roads: Draw linear forms

Description

A few ways of using lines to get possibly interesting images.

Usage

roads(num = 100, hprob = 0.6, color = "black", lwd = 1, seed = NULL)

Arguments

num
the number of objects (lines).
hprob
probablity that a line is horizontal.
color
vector of colors.
lwd
vector of line widths.
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
roads(color=grep("dark", colors(), value=TRUE), lwd=2:3)

waves(color=grep("wheat", colors(), value=TRUE), lwd=2)

waves01(color=grep("orchid", colors(), value=TRUE), lwd=2:5)

waves02(color=colors(), lwd=2)

# one color only
sticks(color="violet", lwd=2)

Run the code above in your browser using DataLab