title: ggplot2 plotting with black outline
body: <p>I am cross posting from another forum (<a href="https://www.biostars.org/p/268514/#268559" rel="nofollow noreferrer">https://www.biostars.org/p/268514/#268559</a>) where I got useful comments but still am confused by output of ggplot2.</p>
  
  <p>I am trying to get a simple black outline on circles but my code is now giving my random colours and seems to be ignoring my scale_colour_manual(values = cols) argument. When I run the following code:</p>
  
  <pre><code># creating color palette
  
  &gt; cols &lt;- c("red" = "red", "orange" = "orange", "nonsignificant" = "darkgrey", "Increased" = "#00B2FF", "Decreased" = "#00B2FF")
  
  # Make a basic ggplot2 object
  
  &gt; vol &lt;- ggplot(data, aes(x = lfc, y = pval, color = color, labels=gene))
  
  # inserting mnaual colors as per color pallette  with term "scale_colour_manual(values = cols)" below
  
  &gt; vol +   
    ggtitle(label = "Volcano Plot", subtitle = "Colored by fold-change direction") +
    geom_point(size = 2.5, alpha = 1, na.rm = T) +
    scale_colour_manual(values = cols) +
    theme_bw(base_size = 14) + 
    theme(legend.position = "right") + 
    xlab(expression(log[2]("VitD" / "Carrier"))) + 
    ylab(expression(-log[10]("FDR"))) + # Change Y-Axis label
    geom_hline(yintercept = 1, colour="#990000", linetype="dashed") + geom_vline(xintercept = 0.586, colour="#990000", linetype="dashed") + geom_vline(xintercept = -0.586, colour="#990000", linetype="dashed") + 
    scale_y_continuous(trans = "log1p") 
  </code></pre>
  
  <p>I get a beautiful graph with my defined colour palette:</p>
  
  <p><img src="https://i.stack.imgur.com/HVnMN.jpg" alt="Color volcano plot"></p>
  
  <p>Next, I want to add a border to the points and so I only change 2 pieces of code. At the start I make the basic <code>ggplot</code> object with "fill = color" instead of "color = color"</p>
  
  <pre><code>&gt; vol &lt;- ggplot(data, aes(x = lfc, y = pval, fill = color, labels=gene))
  </code></pre>
  
  <p>And I add "shape = 21, colour = "black"" to the "geom_point" argument:</p>
  
  <pre><code>&gt; vol +   
    ggtitle(label = "Volcano Plot", subtitle = "Colored by fold-change direction") +
    geom_point(size = 2.5, alpha = 1, na.rm = T, shape = 21, colour = "black") +
    scale_colour_manual(values = cols) +
    theme_bw(base_size = 14) + 
    theme(legend.position = "right") + 
    xlab(expression(log[2]("VitD" / "Carrier"))) + 
    ylab(expression(-log[10]("FDR"))) + l
    geom_hline(yintercept = 1, colour="#990000", linetype="dashed") + geom_vline(xintercept = 0.586, colour="#990000", linetype="dashed") + geom_vline(xintercept = -0.586, colour="#990000", linetype="dashed") + 
    scale_y_continuous(trans = "log1p") 
  </code></pre>
  
  <p>And suddenly I have the a plot with what seems to be a random selection of 5 colours; and if I print the colors:</p>
  
  <pre><code>print(cols)
  
  red      orange         nonsignificant      Increased      Decreased 
  "red"    "orange"      "darkgrey"           "#00B2FF"      "#00B2FF" 
  </code></pre>
  
  <p>The palette is still there.</p>