title: How do you create a legend for kde plot in Seaborn?
body: <p>I have a kdeplot but I'm struggling to figure out how to create the legend.</p>
  <pre><code>import matplotlib.patches as mpatches  # see the tutorial for how we use mpatches to generate this figure!
  
  # Set 'is_workingday' to a boolean array that is true for all working_days
  is_workingday = daily_counts[&quot;workingday&quot;] == &quot;yes&quot;
  is_not_workingday = daily_counts['workingday'] == &quot;no&quot;
  # Bivariate KDEs require two data inputs. 
  # In this case, we will need the daily counts for casual and registered riders on workdays
  casual_workday = daily_counts.loc[is_workingday, 'casual']
  registered_workday = daily_counts.loc[is_workingday, 'registered']
  
  # Use sns.kdeplot on the two variables above to plot the bivariate KDE for weekday rides
  sns.kdeplot(casual_workday, registered_workday, color = &quot;red&quot;, cmap = &quot;Reds&quot;, hue = &quot;workingday&quot;, legend = True)
  
  # Repeat the same steps above but for rows corresponding to non-workingdays
  casual_non_workday =  daily_counts.loc[is_not_workingday, 'casual']
  registered_non_workday = daily_counts.loc[is_not_workingday, 'registered']
  
  
  # Use sns.kdeplot on the two variables above to plot the bivariate KDE for non-workingday rides
  sns.kdeplot(casual_non_workday, registered_non_workday, color = 'blue', cmap = &quot;Blues&quot;, legend = True, shade = False)
  </code></pre>
  <p>Gets me this:
  <a href="https://i.stack.imgur.com/l8F36.png" rel="noreferrer"><img src="https://i.stack.imgur.com/l8F36.png" alt="enter image description here" /></a></p>
  <p>I'm trying to get this:
  <a href="https://i.stack.imgur.com/Qh6zc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Qh6zc.png" alt="enter image description here" /></a></p>