s = pd.Series(val, idx)
g = s.groupby([s.index.year, s.index.month]).mean()
ax = g.plot()
ax.set_xticks(list(range(len(g))))
ax.set_xticklabels([('%s-%02d' % item) for item in g.index.tolist()],
    rotation=90)
How to plot a pandas multiindex dataFrame with all xticks