seaborn FacetGrid: How to leave proper space on top for suptitle

user3287545 picture user3287545 · Feb 20, 2015 · Viewed 8.7k times · Source

Could someone show me how to leave extra space on top of a FacetGrid? I try to put a super title to the top of a FacetGrid plot but end up with the super-title overlapping with the subplot titles due to very limited margin on top in the default setting.

Thanks

Answer

mwaskom picture mwaskom · Feb 21, 2015

Use the Figure method subplots_adjust to add space to the top of the plot:

g = sns.lmplot("x", "y", col="c", data=df)
g.fig.suptitle("Title of the plot", size=16)
g.fig.subplots_adjust(top=.9)