Fig2.4 <- function(n=32) { # postscript(file = "Fig2.4.ps", height = 3.9, width = 6.5, horiz = F) par(mar = c(1.5, 1.5, 1.5, 0.5), mgp = c(5, 0.4, 0)) rs <- c(57, 14, 55, 51, 30, 0, 53, 44, 34, 53, 49, 2) .Random.seed <- rs x <- (1:n)/n y <- 5 * sin(x * 2 * pi) ynoise <- y + rnorm(n) plot(c(0, rep(x[1:(n - 1)], rep(2, n - 1)), x[n]), rep(ynoise, rep(2, n)), type = "l") # graphics.off() NULL }