Код: Выделить всё
test_seaborn.py
Код: Выделить всё
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
matplotlib.style.use('ggplot')
import seaborn as sns
sns.set()
df = sns.load_dataset('iris')
sns_plot = sns.pairplot(df, hue='species', size=2.5)
fig = sns_plot.get_figure()
fig.savefig("output.png")
#sns.plt.show()
Код: Выделить всё
Traceback (most recent call last):
File "test_searborn.py", line 11, in
fig = sns_plot.get_figure()
AttributeError: 'PairGrid' object has no attribute 'get_figure'

Как решить проблему?< /п>
Подробнее здесь: https://stackoverflow.com/questions/322 ... nto-a-file