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

2012-02-04 Thread Thomas Schmitt
data.frame(x=factor(letters[1:10]), y=rnorm(100), group=rep(letters[20:24], each=20)) p <- ggplot(df, aes(x=x, y=y, colour=group)) + geom_line() c <- scale_x_discrete(expand=c(0, 0) p p + c On Sat, Feb 4, 2012 at 11:18 AM, Thomas Schmitt wrote: > Hi Group, > > I have been working wit

[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