R语言绘图

1、茎叶图(stem)

如:stem(x,scale=2,width=4)

(1)x为数据向量

(2)scale控制茎叶图的长度,默认为scale=1,若选择scale=2则表示将各位数拆成两段来计数,其中0~4为一段,5~9为一段,其他scale的值类似

(3)width表示所绘茎叶图数据的宽度,即茎叶

d=read.delim("D:/csdn/exam1.2.txt",header=T)
attach(d)
stem(urban)

> stem(urban)

  The decimal point is 1 digit(s) to the right of the |

   0 | 056
   1 | 1122568
   2 | 01234456699
   3 | 24569
   4 | 00123344455667789
   5 | 01134466778
   6 | 0000122345788899
   7 | 001122233445557778
   8 | 12344455556999
   9 | 112466
  10 | 0
 

stem(urban,scale=2)

> stem(urban,scale=2)

  The decimal point is 1 digit(s) to the right of the |

   0 | 0
   0 | 56
   1 | 1122
   1 | 568

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值