Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 目录(sns)未列出plt_Python_Seaborn - Fatal编程技术网

Python 目录(sns)未列出plt

Python 目录(sns)未列出plt,python,seaborn,Python,Seaborn,我试图使用'dir(sns.plt),但这会导致错误: dir(sns.plt) Traceback (most recent call last): File "<ipython-input-3-8072046646b0>", line 1, in <module> dir(sns.plt) AttributeError: module 'seaborn' has no attribute 'plt' dir(sns.plt) 回溯(最近一次呼叫最后一

我试图使用'dir(sns.plt),但这会导致错误:

dir(sns.plt)
Traceback (most recent call last):

  File "<ipython-input-3-8072046646b0>", line 1, in <module>
    dir(sns.plt)

AttributeError: module 'seaborn' has no attribute 'plt'
dir(sns.plt)
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
处长(社会福利署)
AttributeError:模块“seaborn”没有属性“plt”

如何让“plt”显示或添加它?

有关seaborn使用的plt的更多信息,请查看此帖子:
plt
是导入pyplot的常用别名,即
import matplotlib.pyplot as plt
。谢谢!这起作用了。在导入matplotlib.pyplot作为plt之后,我还添加了“pyplot作为plt”。