title: Insufficient values in manual scale for interaction plots: ggplot2 error
body: <p>I am creating interaction plots in <code>ggplot2</code> and keep coming up with the following error: <code>Error: Insufficient values in manual scale. 4 needed but only 2 provided.</code></p>
  <p><strong>Code:</strong></p>
  <pre class="lang-r prettyprint-override"><code>    plot1&lt;- data.frame(effect(&quot;current*child&quot;, outcome, 
      xlevels=list(child=c(-1,1))))
      ggplot(plot1) + geom_line(aes(current, fit,  color = child, 
      linetype=factor(current)), size= 1.25, )+ scale_colour_gradient(low = 
      &quot;darkred&quot;, high = &quot;darkblue&quot;) + theme_bw()+
      coord_cartesian(xlim=c(-10,10), ylim=c(-10,10)) +
      scale_linetype_manual(values=c(&quot;solid&quot;, &quot;dotted&quot;))+
      theme(legend.position='none', panel.grid.major = element_blank(),
          text = element_text(size=16),
          panel.grid.minor = element_blank(),)+ 
      xlab(&quot;Current&quot;)+ylab(&quot;Outcome&quot;) 
  </code></pre>
  <p>I believe it has something to do with <code>scale_color_gradient(low = &quot;darkred&quot;, high = &quot;darkblue&quot;)</code>. However, I don't know how to alter this to remove the error for an interaction plot.</p>
  <p>Thanks!</p>