title: Draw a line on a legend in pyplot
body: <p>I'm trying to draw a line on a legend in a plot to separate the top and bottom rows. At the moment the legend looks like the image below</p>
  
  <p><a href="https://i.stack.imgur.com/qn0CG.png" rel="nofollow noreferrer">Image of legend without a line to separate rows</a></p>
  
  <p>Is there any property in plt.legend that can draw a horizontal line or is there any other methods to draw a line in a legend to look like the image below:</p>
  
  <p><a href="https://i.stack.imgur.com/LGJ3Q.png" rel="nofollow noreferrer">Image of legend with a line to separate rows</a></p>
  
  <p>Many thanks!</p>