摘要: require(grDevices) # for colours filled.contour(volcano, color = terrain.colors, asp = 1) # simple x <- 10*1:nrow(volcano)y <- 10*1:ncol(volcano)fille 阅读全文
posted @ 2017-02-24 11:27 junjunang 阅读(1792) 评论(0) 推荐(0) 编辑
摘要: require(grDevices) # for coloursx <- y <- seq(-4*pi, 4*pi, len = 27)r <- sqrt(outer(x^2, y^2, "+"))image(z = z <- cos(r^2)*exp(-r/6), col = gray((0:32 阅读全文
posted @ 2017-02-24 11:24 junjunang 阅读(719) 评论(0) 推荐(0) 编辑
摘要: library(lattice) Depth <- equal.count(quakes$depth, number=8, overlap=.1)xyplot(lat ~ long | Depth, data = quakes) 阅读全文
posted @ 2017-02-24 11:18 junjunang 阅读(580) 评论(0) 推荐(0) 编辑
摘要: 参考自 153分钟 使用平滑曲线,沿着X轴从左向右的顺序依次连接,可以使用spline样条函数线。 x = 1:5 y = c(1,3,4,2.5,2) plot(x,y) sp = spline(x,y,n = 50) lines(sp) 阅读全文
posted @ 2017-02-24 10:59 junjunang 阅读(946) 评论(0) 推荐(0) 编辑
摘要: 参考自153分钟学习R语言 坐标y 上的数字如何水平放置?仍然是绘图参数问题: ?par # see lasplot(0, 0, xaxt="n" , type="n" , ylim=c( 0, 100) , las=1 )mtext ("35" , side =2, at=35, line =1, 阅读全文
posted @ 2017-02-24 10:30 junjunang 阅读(5262) 评论(0) 推荐(0) 编辑