How to save picture boxplot seaborn

Viewed 9348

I create a boxplot as bellow

import seaborn as sns
sns.set_style("whitegrid")
tips = sns.load_dataset("tips")
ax = sns.boxplot(x=tips["total_bill"])

& try to save

sns.boxplot.savefig('ax.png')

or

ax.savefig('ax.png')

but

AttributeError: 'AxesSubplot' object has no attribute 'savefig'

It's surprisely, beacause it's correct for lmplot etc....

3 Answers
Related