统计模拟与R相关资料习题答案.ppt

统计模拟与R相关资料习题答案

画图(image) data(volcano) x - 10*(1:nrow(volcano)) y - 10*(1:ncol(volcano)) image(x, y, volcano, col = terrain.colors(100), axes = FALSE) contour(x, y, volcano, levels = seq(90, 200, by=5), add = TRUE, col = peru) axis(1, at = seq(100, 800, by = 100)) axis(2, at = seq(100, 600, by = 100)) box() title(main = Maunga Whau Volcano, font.main = 4) 画图(箭头和线段) x=runif(12);y=rnorm(12);I=order(x,y);x=x[i];y=y[i];plot(x,y, main=arrows(.) and segments(.))## draw arrows from point to point : s=seq(length(x)-1)# one shorter than data arrows(x[s],y[s],x[s+1],y[s+1],col=

文档评论(0)

1亿VIP精品文档

相关文档