|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 2OLEGEND 于 2018-4-7 12:56 编辑
各位老师好,最近想学习下seaborn画图,使用的python环境为Anaconda 5.1,在Anaconda Prompt下输入conda list显示已经安装seaborn,但是在按照seaborn官网上的例子进行练习的时候,会报错:module 'seaborn' has no attribute 'JointGrid',即使把JointGrid换成其他诸如set_style等也是同样的错误,请问下,这是什么原因?截图和代码如下:
- import numpy as np
- import seaborn as sns
- import matplotlib.pyplot as plt
- rs = np.random.RandomState(9)
- mean = [0, 0]
- cov = [(1, 0), (0, 2)]
- x, y = rs.multivariate_normal(mean, cov, 100).T
- grid = sns.JointGrid(x, y, space=0, size=6, ratio=50)
- grid.plot_joint(plt.scatter, color="g")
- grid.plot_marginals(sns.rugplot, height=1, color="g")
复制代码
PS:使用其他模块暂时没有问题,numpy,pandas,matplotlib,time,math等常用模块都没有问题,只是seaborn有问题!
|
|