title: Matplotlib bbox_to_anchor with subplots
body: <p>I have the following problem:
  I am trying to plot some data on the same figure using subplots and two columns for the legends because otherwise it gets into the figure and I cant see the data.</p>
  
  <hr>
  
  <p>You can see the code [more or less] here:</p>
  
  <pre><code>for i in range(no_of_cust_clusters):
      ax[i] = plt.subplot(gs[i],)
      df[i].plot(ax=ax[i])
      ax[i].legend(bbox_to_anchor=(0, 0, 1, 1),
         bbox_transform=plt.gcf().transFigure,ncol=2)
  </code></pre>
  
  <hr>
  
  <p>I have also tried:</p>
  
  <pre><code>bbox_to_anchor=(0, 0, 1, i/no_of_cust_clusters)
  bbox_to_anchor=(0, 0, 1, i)
  </code></pre>
  
  <blockquote>
    <p>Also note that gs is gridspec in order to customize the location.</p>
  </blockquote>
  
  <p>Though, when I am plotting the data, all of the legends go to the top right corner of the figure (as I've said I have one figure with multiple subplots, specified by gridspec). How can I solve this problem?
  Thanks!</p>