title: Categorize and order bar chart by Hue
body: <p>I have a problem. I want to show the two highest countries of each category. But unfortunately I only get the below output. However, I would like the <code>part</code> to be listed as an extra category.
  Is there an option?</p>
  <pre class="lang-py prettyprint-override"><code>import pandas as pd
  import seaborn as sns
  d = {'count': [50, 20, 30, 100, 3, 40, 5],
       'country': ['DE', 'CN', 'CN', 'BG', 'PL', 'BG', 'RU'],
       'part': ['b', 'b', 's', 's', 'b', 's', 's']
      }
  df = pd.DataFrame(data=d)
  print(df)
  
  #print(df.sort_values('count', ascending=False).groupby('party').head(2))
  
  ax = sns.barplot(x=&quot;country&quot;, y=&quot;count&quot;, hue='part',
                   data=df.sort_values('count', ascending=False).groupby('part').head(2), palette='GnBu')
  </code></pre>
  <p>What I got</p>
  <p><a href="https://i.stack.imgur.com/sIqo5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sIqo5.png" alt="enter image description here" /></a></p>
  <p>What I want</p>
  <p><a href="https://i.stack.imgur.com/Y1kPz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y1kPz.png" alt="enter image description here" /></a></p>