Re: [R] GGPLOT2: Distance of discrete values of from each end of x-axis

2012-02-04 Thread Thomas Schmitt
Sorry group didn't realize this got cross-posted on R-help . . . thought it didn't make it through. Thanks to Justin Haynes for the solution below and wanted to pass it along. With a factor you can add: scale_x_discrete(expand=c(0, 0)) to plot all the way to the edges: df <- data.frame(x=facto

[R] GGPLOT2: Distance of discrete values of from each end of x-axis

2012-02-04 Thread Thomas Schmitt
Hi Group, I have been working with the code below. Everything seems to work okay, except that the discrete values on the x-axis are far from each end of the graph. I've tried several things including changing the discrete values and playing with the limits, but can't get it to work. I tested this