title: How to use a Matplotlib proxy artist with stackplot?
body: <p>Example (runs in <code>ipython --pylab</code>):</p>
  
  <pre><code>x = arange(25)
  Y = maximum(0,2+randn(7,25))
  stackplot(x,Y)
  legend(('A','B','C','D','E','F','G'))
  </code></pre>
  
  <p><strong>The problem:</strong> instead of a proper legend, I get an empty rectangle. This is a <a href="https://github.com/matplotlib/matplotlib/issues/1943" rel="nofollow">known issue</a> and one work-around is using another plot element that supports legend, also called a <em><a href="http://matplotlib.org/users/legend_guide.html#using-proxy-artist" rel="nofollow">proxy artist</a></em>. Now I wonder how this idiom is translated to my case with seven data series. Here is what I tried:</p>
  
  <pre><code> proxy = [Rectangle((0,0), 0,0) for _ in Y]
   legend(proxy, ('A','B','C','D','E','F','G'))
  </code></pre>
  
  <p>Now I have a legend with 7 elements, but they are all blue. How can I have the proxy artists match the stackplot colors?</p>