title: How to have several hue conditions with seaborn boxplot
body: <p>I am looking for your help as a new user in python, pandas, seaborn etc.
  Here is my problem : I have a pandas dataframe with the following structure:</p>
  <pre><code>df = pd.DataFrame([[1, &quot;M1&quot;,&quot;2020&quot;,&quot;Brut&quot;,&quot;A&quot;,0.51], 
                     [1, &quot;M2&quot;,&quot;2020&quot;,&quot;Brut&quot;,&quot;A&quot;,0.6], 
                     [1, &quot;M3&quot;,&quot;2020&quot;,&quot;Brut&quot;,&quot;A&quot;,0.2],
                     [1, &quot;M1&quot;,&quot;2030&quot;,&quot;Brut&quot;,&quot;A&quot;,0.5],
                     [1, &quot;M2&quot;,&quot;2030&quot;,&quot;Brut&quot;,&quot;A&quot;,0.6],
                     [1, &quot;M3&quot;,&quot;2030&quot;,&quot;Brut&quot;,&quot;A&quot;,0.8],
                     [2, &quot;M1&quot;,&quot;2020&quot;,&quot;Brut&quot;,&quot;B&quot;,1], 
                     [2, &quot;M2&quot;,&quot;2020&quot;,&quot;Brut&quot;,&quot;B&quot;,0.4], 
                     [2, &quot;M3&quot;,&quot;2020&quot;,&quot;Brut&quot;,&quot;B&quot;,0.3],
                     [3, &quot;M1&quot;,&quot;2030&quot;,&quot;Brut&quot;,&quot;B&quot;,0.6],
                     [3, &quot;M2&quot;,&quot;2030&quot;,&quot;Brut&quot;,&quot;B&quot;,0.85],
                     [3, &quot;M3&quot;,&quot;2030&quot;,&quot;Brut&quot;,&quot;B&quot;,0.59]], 
                     columns=['Site', 'Model','Time','Type','Region','Value'])
  </code></pre>
  <p>which give this pandas dataframe</p>
  <pre><code>    Site Model  Time  Type Region  Value
  0      1    M1  2020  Brut      A   0.51
  1      1    M2  2020  Brut      A   0.60
  2      1    M3  2020  Brut      A   0.20
  3      1    M1  2030  Brut      A   0.50
  4      1    M2  2030  Brut      A   0.60
  5      1    M3  2030  Brut      A   0.80
  6      2    M1  2020  Brut      B   1.00
  7      2    M2  2020  Brut      B   0.40
  8      2    M3  2020  Brut      B   0.30
  9      3    M1  2030  Brut      B   0.60
  10     3    M2  2030  Brut      B   0.85
  11     3    M3  2030  Brut      B   0.59
  </code></pre>
  <p>What I would like to do is to have a seaborn boxplot with both Site and Region as &quot;hue&quot; condition.
  I would like to have an indication of the region corresponding to each site. For example I would like the sites 2&amp;3 to be link to region B.
  For now, i can only succeed a simple boxplot.</p>
  <p>Here is my code :</p>
  <pre><code>import pandas as pd
  from os.path import isfile, join
  import matplotlib.pyplot as plt
  import seaborn as sns
  from matplotlib.patches import PathPatch
  
  path=r&quot;C:\Downloads\test_seaborn.csv&quot;
  df=pd.read_csv(path,&quot;;&quot;)
  
  fig = plt.gcf()
  # Change seaborn plot size
  fig.set_size_inches(20, 20)
  #change seaborn x and y axis size
  sns.set(font_scale=1.4)
  sns.set_style(&quot;darkgrid&quot;) #format of the grid
  # call boxplot function, x and y must be columns of the dataframe, part of the code to add the mean
  bp=sns.boxplot(x='Site',y='Value',hue=&quot;Time&quot;, data=df)
  # add a title
  bp.set_title(&quot;Boxplot per site&quot;,fontdict= { 'fontsize': 24, 'fontweight':'bold'})
  # set x label and y label size and name
  bp.set_xlabel('Site',fontsize = 20, )
  bp.set_ylabel('Value (m²/s)',fontsize = 20 )
  # set legend caracteristics
  bp.legend(fontsize = 20, \
                 title=&quot;Time&quot;, \
                 title_fontsize = 18, \
                 shadow = True, \
                 facecolor = 'white')
  </code></pre>
  <img src="https://i.stack.imgur.com/Kd2XZ.png" width="500" />
  <p>Any idea to help me ?</p>
  <p>best regards
  Natahn</p>