0
我正在使用以下代码来绘制2个变量的密度:车辆速度和坡度。但R会报错:ggplot2中的错误R studio中的geom_density
>p <- ggplot(data=final.data, aes(`Vehicle velocity`))+geom_density(aes(color=I('red')))
>p
>Don't know how to automatically pick scale for object of type AsIs. Defaulting to continuous
Error: Discrete value supplied to continuous scale
是什么原因?提前致谢。
是我在'color = I('red')'应该在那儿吗?否则它可能是数据格式 – JeremyS