title: Matplotlib: Adjust legend location/position
body: <p>I'm creating a figure with multiple subplots. One of these subplots is giving me some trouble, as none of the axes corners or centers are free (or can be freed up) for placing the legend. What I'd like to do is to have the legend placed somewhere in between the 'upper left' and 'center left' locations, while keeping the padding between it and the y-axis equal to the legends in the other subplots (that are placed using one of the predefined legend location keywords). </p>
  
  <p>I know I can specify a custom position by using <code>loc=(x,y)</code>, but then I can't figure out how to get the padding between the legend and the y-axis to be equal to that used by the other legends. Would it be possible to somehow use the <code>borderaxespad</code> property of the first legend? Though I'm not succeeding at getting that to work.</p>
  
  <p>Any suggestions would be most welcome!</p>
  
  <p>Edit: Here is a (very simplified) illustration of the problem:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  fig, ax = plt.subplots(1, 2, sharex=False, sharey=False)
  ax[0].axhline(y=1, label='one')
  ax[0].axhline(y=2, label='two')
  ax[0].set_ylim([0.8,3.2])
  ax[0].legend(loc=2)
  
  ax[1].axhline(y=1, label='one')
  ax[1].axhline(y=2, label='two')
  ax[1].axhline(y=3, label='three')
  ax[1].set_ylim([0.8,3.2])
  ax[1].legend(loc=2)
  
  plt.show()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/wRdqk.png" alt="enter image description here"></p>
  
  <p>What I'd like is that the legend in the right plot is moved down somewhat so it no longer overlaps with the line.
  As a last resort I could change the axis limits, but I would very much like to avoid that.</p>