R绘图lattice包

lattice包:
学习此包的网站:
http://cm.bell-labs.com/cm/ms/departments/ sia/doc/trellis.user.pdf
另外lattice包有一个扩展包是基于lattice的,就是R的 latticeExtra
由于它可以轻松生 栅栏图形,因此许多用户都会使用它。
lattice包提供了丰富的函数,可生成单变量图形(点图、核密度图、直方图、柱状图和箱线图)、双变量图形(散点图、带状图和平行箱线图)和多变量图形(三维图和散点图矩阵)。
各种高级绘图函数都服从以下格式:
graph_function(formula,data= ,options)
  • graph_function是表16-2的第二栏列出的某个函数。
  • formula指定要展示的变量和条件变量。
  • data指定一个数据框。
  • options是逗号分隔参数,用来修改图形的内容、摆放方式和标注。表16-3列出了一些常见的选项。

lattice包中的图形类型和相应函数
图形类型
函数及说明
表达式示例
示例
三维等高线图 contourpolt()
z~x*y
contourplot(volcano)

三维水平图 levelpolt()
z~y*x
levelplot(volcano)
三维散点图 cloud()
z~x*y|A

三维线框图 wireframe()
z~y*x
wireframe(volcano)
条形图 barchart() x~A或A~x  
箱线图 bwplot()
x~A或A~x
bwplot(mtcars$mpg)
  • 9
    点赞
  • 56
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
About this book Gives a comprehensive overview of the Lattice graphics system and shows how to use it effectively Includes numerous examples using data sets from various R packages All code and figures including color version also available online R is rapidly growing in popularity as the environment of choice for data analysis and graphics both in academia and industry. Lattice brings the proven design of Trellis graphics (originally developed for S by William S. Cleveland and colleagues at Bell Labs) to R, considerably expanding its capabilities in the process. Lattice is a powerful and elegant high level data visualization system that is sufficient for most everyday graphics needs, yet flexible enough to be easily extended to handle demands of cutting edge research. Written by the author of the lattice system, this book describes it in considerable depth, beginning with the essentials and systematically delving into specific low levels details as necessary. No prior experience with lattice is required to read the book, although basic familiarity with R is assumed. The book contains close to150 figures produced with lattice. Many of the examples emphasize principles of good graphical design; almost all use real data sets that are publicly available in various R packages. All code and figures in the book are also available online, along with supplementary material covering more advanced topics. Deepayan Sarkar won the 2004 John M. Chambers Statistical Software Award for writing lattice while he was a graduate student in Statistics at the University of Wisconsin-Madison. He is currently doing postdoctoral research in the Computational Biology program at the Fred Hutchinson Cancer Research Center, a member of the R Core Team, and an active participant on the R mailing lists. Written for: Researchers, grad students

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值