Skip to content
Advertisement

AtributeError: ‘module’ object has no attribute ‘plt’ – Seaborn

I’m very new with these libraries and i’m having troubles while plotting this:

JavaScript

And i’m getting this output:

JavaScript

I’m running this in my Jupyter Notebook with Python 2.7.12. Any ideas?

Advertisement

Answer

sns.plt.show() works fine for me using seaborn 0.7.1. Could be that this is different in other versions. However, if you anyways import matplotlib.pyplot as plt you may as well simply use plt.show(), as sns.plt.show() is only working because pyplot is available inside the seaborn namespace.

Advertisement