arr = df['NIKKEI225'].dropna().pct_change().fillna(0)
width = 0.3
gb = arr.groupby([arr.index.year, arr.index.quarter])
n = len(gb)
clr = sns.hls_palette(n)
freqlist = []
vallist = []
xtickslabel = []
for k,v in gb:
xtickslabel.append(k)
cut, bins = pd.cut(v, bins=25, retbins=True)
freqlist.append(cut.value_counts().sort_index().values)
vallist.append(bins[:-1])
max_ = np.max(freqlist)
plt.figure(figsize=(15,10))
for i,(v,freq) in enumerate(zip(vallist, freqlist)):
f = -freq/(max_*width) + i
zorder = i+1
plt.plot(f, v, color='k', lw=0.3, zorder=zorder)
plt.fill_betweenx(v, f, i, color=clr[i], alpha=1, zorder=zorder)
plt.xticks(range(n), xtickslabel, rotation=-45)
plt.xlim(-max_/(max_*width), n);
plt.ylim(np.min(vallist), np.max(vallist));