Learn R Programming

TaoTeProgramming (version 1.0)

bendplot: Bend plots

Description

Random bend plots. Describing them is hard, seeing them is easy.

Usage

bendplot(num = 20000, xdelta = 0.1, ydelta = 0.2, sd = 1, lwd = 2, color = "black", seed = NULL) bendplotmultcol(num = 20000, xdelta = 0.1, ydelta = 0.2, sd = 1, lwd = 2, color = colors(), cnum = 100, seed = NULL) bend(num = 20000, xdelta = 100, ydelta = 200, sd = 1)

Arguments

num
number of data points
xdelta
horizontal scaling.
ydelta
vertical scaling
sd
standard deviation of normal deviates.
lwd
a single number giving the line width.
color
one or more colors.
seed
an integer giving the argument for set.seed.
cnum
an integer giving the number of colors to use.

Value

bend returns a two-column matrix.

Side effects

bendplot and bendplotmultcol 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

set.seed.

Examples

Run this code
# one color
bendplot(xdelta=150, ydelta=150, 
    color=grep("green", colors(), value=TRUE), seed=2)
    
# multiple colors    
bendplotmultcol(xdelta=150, ydelta=150, 
    color=grep("green", colors(), value=TRUE), seed=2) 
    
bendplotmultcol(xdelta=100, ydelta=200, sd=.001, 
   color=grep("sienna", colors(), value=TRUE))

Run the code above in your browser using DataLab