title: Remove the legend on a matplotlib figure
body: <p>To add a legend to a matplotlib plot, one simply runs <code>legend()</code>.</p>
  
  <p>How to <strong>remove</strong> a legend from a plot?</p>
  
  <p>(The closest I came to this is to run <code>legend([])</code> in order to empty the legend from data. But that leaves an ugly white rectangle in the upper right corner.)</p>