title: Color by manual scale for geom errorbar
body: <p>I am having trouble trying to set my errorbars to manual colors to follow the color scheme I have set for my points.  Essentially, I would like the color of each errorbar to match the fill color of it's associated point. </p>
  
  <p>Create dataframe</p>
  
  <pre><code>mean&lt;-c(4,5,6,7)
  CI&lt;-c(0.5,0.4,0.3,0.2)
  stress&lt;-c(1,2,3,4)
  a&lt;-c(10,10,20,20)
  b&lt;-c(7.5,7.5,8,8)
  data&lt;-data.frame(mean,CI,stress,a,b)
  </code></pre>
  
  <p>Original Plot</p>
  
  <pre><code>library(ggplot2)
  p&lt;- ggplot(data, aes(a, mean))
  p+geom_point()+
    geom_errorbar(aes(ymax=mean+CI,ymin=mean-CI), width=0.3, color=factor(stress))+
    geom_point(aes(fill=factor(stress)),size=8, shape=21)+
    scale_fill_manual("Stress",breaks=c(1,2,3,4),values=c("#0072B2", "#009E73", "#E69F00", "#D55E00"))+
    scale_x_continuous("Level A",breaks=c(10,20))+
    ylab(expression("Level B"))+
    theme_bw(17)
  </code></pre>
  
  <p>Attempt to create manually colored error bars, but didn't work</p>
  
  <pre><code>p&lt;- ggplot(data, aes(a, mean))
      p+geom_point()+
        geom_errorbar(aes(ymax=mean+CI,ymin=mean-CI), width=0.3, color=factor(stress))+
  scale_color_manual("Stress", breaks=c(1,2,3,4),values=c("#0072B2", "#009E73", "#E69F00", "#D55E00"))+
        geom_point(aes(fill=factor(stress)),size=8, shape=21)+
        scale_fill_manual("Stress",breaks=c(1,2,3,4),values=c("#0072B2", "#009E73", "#E69F00", "#D55E00"))+
        scale_x_continuous("Level A",breaks=c(10,20))+
        ylab(expression("Level B"))+
        theme_bw(17)
  
  p&lt;- ggplot(data, aes(a, mean))
          p+geom_point()+
            geom_errorbar(aes(ymax=mean+CI,ymin=mean-CI), width=0.3, color=factor(stress))+
      scale_fill_manual("Stress", breaks=c(1,2,3,4),values=c("#0072B2", "#009E73", "#E69F00", "#D55E00"))+
            geom_point(aes(fill=factor(stress)),size=8, shape=21)+
            scale_fill_manual("Stress",breaks=c(1,2,3,4),values=c("#0072B2", "#009E73", "#E69F00", "#D55E00"))+
            scale_x_continuous("Level A",breaks=c(10,20))+
            ylab(expression("Level B"))+
            theme_bw(17)
  </code></pre>