add title to collection of pandas hist plots

后端 未结 4 970
盖世英雄少女心
盖世英雄少女心 2020-12-23 16:29

I\'m looking for advice on how to show a title at the top of a collection of histogram plots that have been generated by a pandas df.hist() command. For instance, in the his

4条回答
  •  [愿得一人]
    2020-12-23 17:13

    You can use suptitle():

    import pylab as pl
    from 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")
    

提交回复
热议问题