Set no title for pandas boxplot (groupby)

user308827 picture user308827 · May 7, 2014 · Viewed 16.2k times · Source

When drawing a pandas boxplot, grouped by another column, pandas automatically adds a title to the plot, saying 'Boxplot grouped by....'. Is there a way to remove that? I tried using

suptitle('')

as per Pandas: boxplot of one column based on another column

but this does not seem to work. I am using latest pandas (0.13.1) version.

Answer

TomAugspurger picture TomAugspurger · May 7, 2014

Make sure your calling suptitle('') on the right figure.

In [23]: axes = df.boxplot(by='g')

In [24]: fig = axes[0][0].get_figure()

In [25]: fig.suptitle('')
Out[25]: <matplotlib.text.Text at 0x109496090>