- 1、本文档共30页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
R绘图系统1
1.1plot(pressure)text(150, 600, Pressure (mm Hg)\nversus\nTemperature (Celsius))1.2## Comment:# # Examples of the use of standard high-level plotting functions.# # In each case, extra output is also added using low-level # plotting functions.#par(mfrow=c(3, 2))# Scatterplotx - c(0.5, 2, 4, 8, 12, 16)y1 - c(1, 1.3, 1.9, 3.4, 3.9, 4.8)y2 - c(4, .8, .5, .45, .4, .3)par(las=1, mar=c(4, 4, 2, 4), cex=.7)plot.new()plot.window(range(x), c(0, 6))lines(x, y1)lines(x, y2)points(x, y1, pch=16, cex=2)points(x, y2, pch=21, bg=white, cex=2)par(col=gray50, fg=gray50, col.axis=gray50)axis(1, at=seq(0, 16, 4))axis(2, at=seq(0, 6, 2))axis(4, at=seq(0, 6, 2))box(bty=u)mtext(Travel Time (s), side=1, line=2, cex=0.8)mtext(Responses per Travel, side=2, line=2, las=0, cex=0.8)mtext(Responses per Second, side=4, line=2, las=0, cex=0.8)text(4, 5, Bird 131)par(mar=c(5.1, 4.1, 4.1, 2.1), col=black, fg=black, col.axis=black)# Histogram# Random dataY - rnorm(50)# Make sure no Y exceed [-3.5, 3.5]Y[Y -3.5 | Y 3.5] - NAx - seq(-3.5, 3.5, .1)dn - dnorm(x)par(mar=c(4.5, 4.1, 3.1, 0))hist(Y, breaks=seq(-3.5, 3.5), ylim=c(0, 0.5), col=gray80, freq=FALSE)lines(x, dnorm(x), lwd=2)par(mar=c(5.1, 4.1, 4.1, 2.1))# Barplot# Modified from example(barplot)par(mar=c(2, 3.1, 2, 2.1))midpts - barplot(VADeaths, col=gray(0.5 + 1:5/12), names=rep(, 4))mtext(sub( , \n, colnames(VADeaths)),at=midpts, side=1, line=0.5, cex=0.5)text(rep(midpts, each=5), apply(VADeaths, 2, cumsum) - VADeaths/2, VADeaths, col=rep(c(white, black), times=2:3), cex=0.8)par(mar=c(5.1, 4.1, 4.1, 2.1))# Boxplot# Modified example(boxplot) - itself from suggestion by Roger Bivandpar(mar=c(3, 4.1, 2, 0))boxplot(len ~ dose, data = ToothGrowth,boxwex = 0.25, at = 1:3 - 0.2,subset= supp == VC, col=gray90, xlab=,ylab=tooth length, ylim=c(0,35))mtext(Vitamin C dose (mg), side=1, line=2.5, cex=0.8)boxplot(len ~ dose, data = ToothGrowth, add = TRUE,boxwex = 0.25, at = 1:3 + 0.2,subset= supp == OJ)legend(1.5, 9, c(Ascorbic aci
您可能关注的文档
- 2015年无水氟化氢生产现状及科学改造.doc
- 2015年现行所有建筑规范.docx
- 2015年科目三路考考试图解技巧-打印版.doc
- 2015年苹果种植行业报告王春晓.docx
- 2015年吉林省978例药学咨询回顾性分析考试资料.docx
- 2015广东省高考理综生物(广东A卷)答案.docx
- 2015水文与水资源考试重点(to学生).docx
- 2015版标准转换考试阐述题.docx
- 2015现行规范.doc
- 2015年中考汇编电流电路.doc
- 2025年天津现代职业技术学院单招语文2019-2024历年真题考点试卷含答案解析.docx
- 2025年天津滨海职业学院单招职业适应性测试历年(2019-2024年)真题考点试卷含答案解析.docx
- 2025年天津滨海职业学院单招职业技能测试近5年真题考点含答案解析.docx
- 2025年天津机电职业技术学院单招(数学)历年真题考点含答案解析.docx
- 2025年天津生物工程职业技术学院单招语文2019-2024历年真题考点试卷含答案解析.docx
- 2025年天津生物工程职业技术学院单招英语2014-2024历年真题考点试卷摘选含答案解析.docx
- 2025年天津电子信息职业技术学院单招职业适应性测试历年(2019-2024年)真题考点试卷含答案解析.docx
- 2025年天津电子信息职业技术学院单招语文2019-2024历年真题考点试卷含答案解析.docx
- 2025年天津电子信息职业技术学院单招职业技能测试近5年真题考点含答案解析.docx
- 2025年天津生物工程职业技术学院单招职业适应性测试历年(2019-2024年)真题考点试卷含答案解析.docx
文档评论(0)