R 基础绘图note

不涉及到lattice, ggplot2 和ggvis.

| There is a school of thought that this approach is backwards, that we should
| teach ggplot2 first. See
| http://varianceexplained.org/r/teach_ggplot2_to_beginners/ for an outline of
| this view.


使用plot()函数 对于?plot中的说明已经很详细了

对于外观改变方面
如 :
plot(x, col = 2) 能将点变为红色
plot(x, pch = 2)将形状改变为三角形
plot(x, xlim = c(10, 15))限制x轴为10到15
具体可以用?point查看说明

但是对于大多数已经使用ggpolt2进行更高级更美观的绘图了

箱图 :反应分布范围的图,具有分为距这些数据
?boxplot

与大多数一样,使用 “formula”argument

通常用“~”表示变量之间的关系:boxplot(formula = mpg ~ cyl, data = mtcars)

If you want to explore
| other elements of base graphics, then this web page
| (http://www.ling.upenn.edu/~joseff/rstudy/week4.html) provides a useful
| overview.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值