title: Is it possible to hierarchically label a matplotlib (pyplot) bar plot?
body: <p>I've managed to make the following bar plot using matplotlib.pyplot.</p>
  
  <p><img src="https://i.stack.imgur.com/z8qiG.png" alt="enter image description here"></p>
  
  <p>The plot comes from an aggregated PANDAS DataFrame, printed below. Note that each bar in the bar-plot corresponds to a value in the <code>mean</code> column. Also note that the values are <strong>not</strong> zero, but that PANDAS outputs <code>0</code> and <code>-0</code> when floats are very small.</p>
  
  <pre><code>Group Local Global Attn  mean
  ASub  LD    GD     Attn    -0
                     Dist    -0
              GS     Attn    -0
                     Dist    -0
        LS    GD     Attn    -0
                     Dist    -0
              GS     Attn    -0
                     Dist    -0
  DSub  LD    GD     Attn    -0
                     Dist     0
              GS     Attn    -0
                     Dist    -0
        LS    GD     Attn    -0
                     Dist    -0
              GS     Attn    -0
                     Dist    -0
  </code></pre>
  
  <p>I would like to label the x-axis of my bar plot hierarchically, in a manner corresponding to the labels above. In other words, the left half of the x-axis corresponds to the <code>ASub</code> group. The left half of the <code>ASub</code> group corresponds to the <code>LD</code> level of the  <code>Local</code> factor, and so on...</p>
  
  <p>Can this be done?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I think I should probably clarify exactly what I want. I'd like for there to be several labels, progressing from most general (Group) to most specific (Attn), similar to the organization on the left 4 columns of the DataFrame above.</p>