Re: [R] ggplot2, density barplot and geom_point layer

2010-04-07 Thread Johannes Graumann
Thanks so much. Solved. Joh hadley wickham wrote: > Because of the way you've constructed the plot with qplot, you need to > use: > > myPlot + geom_point( > data=medians, > aes(x=med,shape=cut, y=0), > size=2.5, > ) > > Hadley > > On Wed, Apr 7, 2010 at 5:11 AM, Johannes Graumann > wrote:

Re: [R] ggplot2, density barplot and geom_point layer

2010-04-07 Thread hadley wickham
Because of the way you've constructed the plot with qplot, you need to use: myPlot + geom_point( data=medians, aes(x=med,shape=cut, y=0), size=2.5, ) Hadley On Wed, Apr 7, 2010 at 5:11 AM, Johannes Graumann wrote: > Hi, > > Please consider the example below. How can I manage to overlay the p

[R] ggplot2, density barplot and geom_point layer

2010-04-07 Thread Johannes Graumann
Hi, Please consider the example below. How can I manage to overlay the points the way I want in the second case? Thanks, Joh library(ggplot2) # Modify data to match "real" case myDiamonds <- diamonds myDiamonds[["clarity"]] <- as.character(myDiamonds[["clarity"]]) myDiamonds[myDiamonds[["clari