> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
--
Cheers,
jcb!
_______________________
http://twitter.com/jcborras
> ggplot(data=df, aes(x=x, y=y, weight=y)) + geom_bar(stat='identity', binwidth=1)
While this one will produce a warning about stacking:
> ggplot(data=df, aes(x=x, y=-y, weight=y)) + geom_bar(stat='identity', binwidth=1)
Mixing both y= and weight= in an aes() call is something that keeps me
scratching my head. After all neither of the subsequent (in this
discussion) geoms can do much with both of them when stated together.
But I'll be more than glad to be proved again today dead wrong.
And now if you excuse me this one over here looks deep and dark enough.....
Cheers,
jcb!
> df=data.frame(x=seq(1,10), y=seq(10,1,-1))
> ggplot(data=df, aes(x=x, weight=y)) + geom_histogram(binwidth=1)
Yes, this is definitely a bug, but one that is hard to fix in the
short-term. It's due to the way that stat_bin uses weight and
geom_bar uses y, and needs a rather large rewrite of the geom/stat
system to fix - it's on my radar, but it's unlikely that I'll have the
time to tackle this before next summer.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/