title: Circle patch as matplotlib legend marker
body: <p>I am drawing some circles onto an image using the following:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  import matplotlib.patches as mpatches
  
  image = np.zeros((20,20))
  
  x_coords = [3,12]
  y_coords = [3,12]
  
  fig, ax = plt.subplots()
  ax.imshow(image)
  
  for a,b in zip(x_coords,y_coords):
      circle = plt.Circle((a, b), 2, color="yellow", fill=False, linewidth=2)
      ax.add_artist(circle)
  </code></pre>
  
  <p>I can then add a legend onto this using one of the answers to <a href="https://stackoverflow.com/questions/25482876/how-to-add-legend-to-imshow-in-matplotlib">this question</a>:</p>
  
  <pre><code>patches = [mpatches.Patch(color="yellow", label="Test")]
  plt.legend(handles=patches, bbox_to_anchor=(1.05, 1), loc=2)
  </code></pre>
  
  <p>Which produces this figure:</p>
  
  <p><a href="https://i.stack.imgur.com/kwdii.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kwdii.png" alt="enter image description here"></a></p>
  
  <p>How do I change the legend handles from a rectangle to a circle (similar to what is drawn onto the image)?</p>
  
  <p>I have tried using </p>
  
  <pre><code>patches = [mpatches.Circle((0,0), 2, color="yellow", label="Test")]
  plt.legend(handles=patches, bbox_to_anchor=(1.05, 1), loc=2)
  </code></pre>
  
  <p>which still produces a rectangle in the legend. I have also tried</p>
  
  <pre><code>plt.legend(handles=[circle], labels=["Test"], bbox_to_anchor=(1.05, 1), loc=2)
  </code></pre>
  
  <p>Which still produces a rectangle, but with no fill. The desired result should be to have a circle, the same colour and fill as what is drawn on the image, as the legend marker.</p>
  
  <p>I am using Python 3.4 and matplotlib 2.1.0</p>