title: ggplot2 - jitter and position dodge together
body: <p>I am trying to recreate a figure from a GGplot2 seminar <a href="http://dl.dropbox.com/u/42707925/ggplot2/ggplot2slides.pdf" rel="noreferrer">http://dl.dropbox.com/u/42707925/ggplot2/ggplot2slides.pdf</a>.  </p>
  
  <p>In this case, I am trying to generate Example 5, with jittered data points subject to a dodge.  When I run the code, the points are centered around the correct line, but have no jitter.</p>
  
  <p>Here is the code directly from the presentation.</p>
  
  <pre><code>set.seed(12345)
  hillest&lt;-c(rep(1.1,100*4*3)+rnorm(100*4*3,sd=0.2),
         rep(1.9,100*4*3)+rnorm(100*4*3,sd=0.2))
  rep&lt;-rep(1:100,4*3*2)
  process&lt;-rep(rep(c("Process 1","Process 2","Process 3","Process 4"),each=100),3*2)
  memorypar&lt;-rep(rep(c("0.1","0.2","0.3"),each=4*100),2)
  tailindex&lt;-rep(c("1.1","1.9"),each=3*4*100)
  ex5&lt;-data.frame(hillest=hillest,rep=rep,process=process,memorypar=memorypar, tailindex=tailindex)
  stat_sum_df &lt;- function(fun, geom="crossbar", ...) {stat_summary(fun.data=fun, geom=geom, ...) }
  
  dodge &lt;- position_dodge(width=0.9) 
  p&lt;- ggplot(ex5,aes(x=tailindex ,y=hillest,color=memorypar)) 
  p&lt;- p + facet_wrap(~process,nrow=2) + geom_jitter(position=dodge) +geom_boxplot(position=dodge)  
  p
  </code></pre>