Hi Jason,

On Mon, Feb 2, 2009 at 9:10 AM, Jason Rupert <jasonkrup...@yahoo.com> wrote:
> I'm looking at ggplot-static\position_dodge.html
>
> For ggplot(diamonds, aes(x=price, fill=cut)) + geom_bar(position="dodge") , 
> is it possible to specify the spacing between the dodge'd bin groupings?
>
> That is, I would like for there to be a small separation (horizontal space) 
> between the "Ideal" and the "Fair" bars on the plot.  That way the reader can 
> get a better idea of when each bin ends and the other begins.
>
> I think this "horizontal spacing" naturally occurs for discrete data, but for 
> continuous data as is shown in the second figure, the bins all seem to right 
> beside each other.  It would be nice if a small space could be added.

You can do something like this:

ggplot(diamonds, aes(x=price, fill=cut)) +
geom_bar(position=position_dodge(width=400), binwidth=500)

Hadley

-- 
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