title: How to add bar and line under the same label in a legend?
body: <p>I made a plot with 2 Y axes, where one has a bar chart and the other one lines and I would like to add a common legend for both plots.</p>
  
  <p>If I add the following:</p>
  
  <pre><code>axis1.legend([(bar1, line1), (bar2, line2)], ['Solution 1', 'Solution 2'], 
               loc='upper left', numpoints=1)
  </code></pre>
  
  <p>I almost get what I want, except for the markers / artists (not sure which term is suitable here), which are overlapping for both solutions as seen here:</p>
  
  <p><a href="https://i.stack.imgur.com/s0Lmx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s0Lmx.png" alt="Overlapping Artists"></a></p>
  
  <p>Is it possible to have the bar artist first and the line artist second, side by side, and then the label?</p>
  
  <p>I suppose this has to do with the legend handler, according to the official <a href="http://matplotlib.org/users/legend_guide.html#legend-handler" rel="nofollow noreferrer">Legend guide</a> the tuple handler "simply plots the handles on top of one another for each item in the given tuple". Could anyone help me in writing a new custom handler which plots the handles side by side?</p>
  
  <p>Edit: This question seems quite similar to <a href="https://stackoverflow.com/questions/29452535/two-adjacent-symbols-in-matplotlib-legend">this</a>.</p>