title: ggplot2 custom legend shapes
body: <p>When we have both shape and color legend in scatter plot, the shape of color legend is misleading:</p>
  
  <pre><code>foo &lt;- data.frame(
    length=runif(10),
    height=runif(10),
    group=as.factor(sample(3,10,rep=T)),
    quality=as.factor(sample(2,10,rep=T))
  )
  
  ggplot(foo, aes(x = length, y = height, color=group, shape=quality)) + 
    geom_point(size=5)
  </code></pre>
  
  <p>This will produce the plot below. As you see, the "circle" shape is reserved for the objects of <code>quality==1</code>, however in the <code>group</code> legend, all 3 groups are presented in "circle" shapes - with different colors, this can be misleading.</p>
  
  <p>It was too much better if the <code>group</code> legend was represented by a shape not already reserved for a specific purpose, like just to fill the whole legend item with the specific color.</p>
  
  <p>Do you have any simple idea how to solve this?</p>
  
  <p><img src="https://i.stack.imgur.com/l3Mqk.png" alt="enter image description here"></p>