> However if you do:
> ggplot(data=dafr, aes(x = d1, fill=d2)) + geom_histogram(binwidth = 1, 
> position = position_dodge(width=0.99))
>
> The position of first bin which goes from 0-2 appears to start at about 0.2 
> (I accept that there is some "white space" to the left of this) while the 
> position of the last bin (16-18) appears to start at about 15.8, so the whole 
> histogram seems to be wrongly compressed into the scale. In my real data 
> which has potentially 250 bins the problem becomes much more pronounced. Has 
> any one else noticed this? Is there a work around?

What do you expect this to do?  The bars are one unit wide, but you've
told position_dodge to treat them like they're only 0.99 units wide.

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to