I tried the following code (test_seaborn.py):
test_seaborn.py
import matplotlib matplotlib.use(\'Agg\') import matplotlib.pyplot as plt matplotlib.style.use(\'g
You would get an error for using sns.figure.savefig("output.png") in seaborn 0.8.1.
sns.figure.savefig("output.png")
Instead use:
import seaborn as sns df = sns.load_dataset('iris') sns_plot = sns.pairplot(df, hue='species', size=2.5) sns_plot.savefig("output.png")