title: ggplot: Manually add legends for aesthetics that are not mapped
body: <p>I want to produce a barplot overlayed with dots where both have separate legends. Also, I want to choose the color of the bars and the size of the dots using the arguments outside <code>aes()</code>. As both are not mapped, no legend is produced. </p>
  
  <p><strong>1) How can I add a legend manually for both fill and size?</strong></p>
  
  <pre><code>library(ggplot2)
  
  d &lt;- data.frame(group = 1:3,    
                  prop = 1:3 )
  
  ggplot(d, aes(x=group, y=prop)) +
    geom_bar(stat="identity", fill="red") +
    geom_point(size=5)
  </code></pre>
  
  <p><img src="https://i.imgur.com/7G64pNY.png" alt=""> </p>
  
  <p>This is what I came up with: I used dummy mappings and modified the legend according to my needs afterwards. But this approach appears clumsy to me. </p>
  
  <p><strong>2) Is there a manual way to say: Add a legend with this title, these shapes, these colors etc.?</strong></p>
  
  <pre><code>d &lt;- data.frame(dummy1="d1",
                  dummy2="d2",
                  group = 1:3,    
                  prop = 1:3 )
  
  
  ggplot(d, aes(x=group, y=prop, fill=dummy1, size=dummy2)) +
    geom_bar(stat="identity", fill="red") +
    geom_point(size=5) +
    scale_fill_discrete(name="fill legend", label="fill label") +
    scale_size_discrete(name="size legend", label="size label")
  </code></pre>
  
  <p><img src="https://i.imgur.com/1PZWYCJ.png" alt=""> </p>
  
  <p>Above I mapped <code>fill</code> to <code>dummy1</code>. So I would expect <code>scale_fill_discrete</code> to alter this legend. But it appears to modify the <code>size</code> legend instead.</p>
  
  <p><strong>3) I am not sure what went wrong here. Any ideas?</strong></p>