找回密码
 立即注册
查看: 5656|回复: 0

求助

[复制链接]
发表于 2014-9-30 11:11:27 | 显示全部楼层 |阅读模式
想要划一个带有须轴线和密度线的直方图,求问一下代码是怎么回事?
> hist(mtcars$mpg,freq=FALSE,breaks=12,col="red",xlab="miles per gallon",main="curve")
> rug(jitter(mtcars$mpg))
错误于axis(side = side, at = at, labels = labels, ...) :
  plot.new has not been called yet
此外: 警告信息:
In rug(jitter(mtcars$mpg)) : 有些值不能被修整
> lines(density(mtcars$mpg),col="blue")
错误于plot.xy(xy.coords(x, y), type = type, ...) :
  plot.new has not been called yet

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|R语言中文网

GMT+8, 2024-11-25 18:54 , Processed in 0.019808 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表