Related to matplotlib/matplotlib#1257.

This is a feature available in Excel and OpenOffice 3.3.

Example:

I think there may be a simple way to do it with matplotlib's table to construct the hierarchical axes labels. I'm not an expert in matplotlib or pandas, but I've cobbled together a small demo:

import itertools

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

row_labels = itertools.product(['ASub', 'DSub'], ['LD', 'LS'], ['GD', 'GS'],
                               ['Attn', 'Dist'])
midx = pd.MultiIndex.from_tuples([row for row in row_labels],
                                 names=['Group', 'Local', 'Global', 'Attn'])
df = pd.DataFrame({'mean': np.random.rand(16)}, index=midx)

ax = df.plot(kind='bar')
ax.xaxis.set_visible(False)

cell_text = np.array(df.index.tolist()).T
ax.table(cellText=cell_text, rowLabels=df.index.names, cellLoc = 'center')

plt.subplots_adjust(bottom=0.2)
plt.show()

Produces the plot

There's probably a smarter way to populate the table in order to place the labels at the center of the merged cells as well as fix the spacing clashes.

Comment From: petehuang

This issue's last interaction was 4 years ago. As far as I can tell, the functionality is still unsupported, with latest activity in Summer 2016 (matplotlib/matplotlib#6321).

Comment From: MarcoGorelli

there's been no activity here for > 10 years - closing then, but thanks for the suggestion