title: How to add color to a volcano plot in ggplot?
body: <p>I want to change the color of my points in the graph however the vector I created isn't doing that. All my code seems to be running fine but the graph won't print as how I want it.</p>
  <p>The left side should be colored blue and the right side should be red.</p>
  <pre><code># Basic Volcano Plot 
  VP &lt;- ggplot(df.7vsNO, aes(x = log2FC, y = logpv)) + geom_point() + theme_minimal()
  print(VP)
  
  VP2 &lt;- VP + geom_vline(xintercept=c(-1.6, 1.6), col=&quot;red&quot;) +
      geom_hline(yintercept=-log10(0.05), col=&quot;red&quot;)
  
  print(VP2)
  </code></pre>
  <pre><code># add a column of NAs
  df.7vsNO$diffexpressed &lt;- &quot;NO&quot;
  
  # if log2FoldChange &gt; 1, set as &quot;UP&quot;
  df.7vsNO$diffexpressed[df.7vsNO$log2FC &gt; 1] &lt;- &quot;UP&quot;
  
  #if log2FoldChange &lt; 1, set as &quot;DOWN&quot;
  df.7vsNO$diffexpressed[df.7vsNO$log2FC &lt; 1] &lt;- &quot;DOWN&quot;
  </code></pre>
  <pre><code># Re-plot but this time time color the points w/ &quot;diffexpressed&quot;
  
  VP &lt;- ggplot(df.7vsNO, aes(x = log2FC, y = logpv, col(diffexpressed))) + geom_point() + theme_minimal()
  
  print(VP)
  
  # Add lines as before...
  
  VP2 &lt;- VP + geom_vline(xintercept=c(-1.6, 1.6), col=&quot;red&quot;) +
      geom_hline(yintercept=-log10(0.05), col=&quot;red&quot;)
  
  print(VP2)
  </code></pre>
  <pre><code># Change point color
  
  VP3 &lt;- VP2 + scale_color_manual(values=c(&quot;blue&quot;, &quot;black&quot;, &quot;red&quot;))
  
  # named vector
  
  mycolors &lt;- c(&quot;blue&quot;, &quot;red&quot;, &quot;black&quot;)
  names(mycolors) &lt;- c(&quot;DOWN&quot;, &quot;UP&quot;, &quot;NO&quot;)
  
  VP3 &lt;- VP2 + scale_color_manual(values = mycolors)
  
  print(VP3)
  </code></pre>