【发布时间】:2011-11-03 04:44:03
【问题描述】:
我的问题可能类似于Fitting a density curve to a histogram in R。使用 qplot 我用这个命令创建了 7 个直方图:
(qplot(V1, data=data, binwidth=10, facets=V2~.)
对于每个切片,我想添加一条拟合高斯曲线。当我尝试使用lines() 方法时,出现错误:
Error in plot.xy(xy.coords(x, y), type = type, ...) :
plot.new has not been called yet
正确执行的命令是什么?
【问题讨论】:
-
您不能将基本图形函数(
lines()等)与 gpplot2 和 lattice 包使用的网格图形混合。跨度>