I managed to make the following bar graph using matplotlib.pyplot.

The plot comes from an aggregated PANDAS DataFrame printed below. Notice that each column in the line chart corresponds to a value in the mean column. Also note that the values ββare not zero, but PANDAS outputs 0 and -0 when the 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 mark the x axis of my column in hierarchical order, corresponding to the methods 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, etc ...
Can this be done?
EDIT:
I think I should probably clarify what I want. I would like there to be a few shortcuts that go from most general (groups) to most specific (Attn), like the organization located to the left of the four columns of the DataFrame above.
source share