I’ve managed to make the following bar plot using matplotlib.pyplot.

The plot comes from an aggregated PANDAS DataFrame, printed below. Note that each bar in the bar-plot corresponds to a value in the mean column. Also note that the values are not zero, but that PANDAS outputs 0 and -0 when floats are very small.
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
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 ASub group. The left half of the ASub group corresponds to the LD level of the Local factor, and so on…
Can this be done?
EDIT:
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.
On master this is implemented (i used random data for ‘mean’), see image at the bottom.
If you prefer not to upgrade you can also set it manually:
EDIT: