ggplot2 - merge 2 plots (bubblechart, scatterplot) in R -
i new , new r hope provide sufficent information. have 2 kinds of datasets:
- 1 temperatures,dates (more rows other dataset);
- 1 buistemp,dates,bacteria , peilbuis.
i made 2 plots:
ggplot(data=data,aes(x=datum,y=temperatuur,size=bacteria,color=peilbuis)) + geom_point() + scale_size_continuous(range=c(2,10)) and
qplot(data=total,x=datum,y=temperatuur)+geom_line()
that give this: http://puu.sh/2ttju.png
however want create graph overlays these 2 plots. know how properly? (everytime try get: error: aesthetics must either length, and/or don't know how automatically pick scale object of type data.frame. defaulting continuous)
thank in advance.
try this:
ggplot(data=data,aes(x=datum,y=temperatuur,size=bacteria,color=peilbuis))+ geom_point()+ scale_size_continuous(range=c(2,10)) + geom_line(data=total,aes(x=datum,y=temperatuur))
Comments
Post a Comment