AtributeError: 'module' object has no attribute 'plt' - Seaborn

后端 未结 5 1933
没有蜡笔的小新
没有蜡笔的小新 2021-01-07 20:05

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

import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
im         


        
5条回答
  •  没有蜡笔的小新
    2021-01-07 20:30

    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.

提交回复
热议问题