title: ggplot2 geom_jitterdodge points and with overlayed dodged boxplots: I want to preserve color in points but force boxplots to be black
body: <p>Using ggplot2, I want to geom_jitterdodge a swarm of points with overlayed dodged boxplots. The trick is that I want the boxplots to be black, not colored like the points. The point plot looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/7mssH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7mssH.png" alt="enter image description here"></a></p>
  
  <p>It's easy enough to get boxplots in place:</p>
  
  <p><a href="https://i.stack.imgur.com/Kr47y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kr47y.png" alt="enter image description here"></a></p>
  
  <p>The code for that looks like this:</p>
  
  <pre><code>
  
  
  D_cohort1 %&gt;%
      filter(!is.na(pssa_ela_code)) %&gt;%
      ggplot(aes(x=timepoint,
                 y=dibels_lnf,
                 color=pssa_ela_code)) +
      geom_point(alpha=1/6, size=2,  width=1/3, height=0,
                    position=position_jitterdodge()) +
      geom_boxplot(fill=NA, outlier.shape=NA,
                   position=position_dodge2(padding=.3)) +
      facet_grid(rows=vars(school_type)) +
      guides(colour = guide_legend(override.aes = list(alpha=1))) +
      labs(title="Figure A.1: DIBELS LNF Scores at each Timepoint") +
      theme_cowplot() +
      theme(plot.background=element_rect(fill="aliceblue"),
            panel.border=element_rect(color="black", fill=NA),
            legend.position = c(.85,.87),
            legend.text = element_text(size = rel(.7)))
  
  </code></pre>
  
  <p>For visibilities sake, I want the boxplot lines to be black, but I can't quite figure out how to get there. Closest I've come is this (same as before but for the call to geom_boxplot():</p>
  
  <pre><code>
  D_cohort1 %&gt;%
      filter(!is.na(pssa_ela_code)) %&gt;%
      ggplot(aes(x=timepoint,
                 y=dibels_lnf,
                 color=pssa_ela_code)) +
      geom_point(alpha=1/6, size=2,  width=1/3, height=0,
                    position=position_jitterdodge()) +
      geom_boxplot(aes(color=NULL, group=fct_cross(timepoint, pssa_ela_code)),
                   fill=NA, outlier.shape=NA,
                   position=position_dodge2(padding=.3)) +
      facet_grid(rows=vars(school_type)) +
      guides(colour = guide_legend(override.aes = list(alpha=1))) +
      labs(title="Figure A.1: DIBELS LNF Scores at each Timepoint") +
      theme_cowplot() +
      theme(plot.background=element_rect(fill="aliceblue"),
            panel.border=element_rect(color="black", fill=NA),
            legend.position = c(.85,.87),
            legend.text = element_text(size = rel(.7)))
  
  </code></pre>
  
  <p>That gets the color effect I want, but positions the boxplots incorrectly. Shown here:</p>
  
  <p><a href="https://i.stack.imgur.com/jAiaP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jAiaP.png" alt="enter image description here"></a></p>
  
  <p>How can I achieve the effect I want: correctly positioned, black boxplots over colored points?</p>