add title to collection of pandas hist plots add title to collection of pandas hist plots python python

add title to collection of pandas hist plots


With newer Pandas versions, if someone is interested, here a slightly different solution with Pandas only:

ax = data.plot(kind='hist',subplots=True,sharex=True,sharey=True,title='My title')


You can use suptitle():

import pylab as plfrom pandas import *data = DataFrame(np.random.randn(500).reshape(100,5), columns=list('abcde'))axes = data.hist(sharey=True, sharex=True)pl.suptitle("This is Figure title")


I found a better way:

plt.subplot(2,3,1)  # if use subplotdf = pd.read_csv('documents',low_memory=False)df['column'].hist()plt.title('your title')

It is very easy, display well at the top, and will not mess up your subplot.