python - seaborn 聚类的问题
问题描述
嗨,我以前使用过 seaborn,但最近由于某种原因我不能再使用 sns.clustermap。我什至回到网页并尝试使用他们粘贴在下面的示例代码,但我不断收到 'AttributeError: Unknown property axisbg' 。我尝试过重新安装 Matplotlib 和 seaborn,甚至尝试过conda install _library_Matplotlib
and conda install _library_seaborn
,但没有任何效果。我什至试图改变我的python版本。
python 3.6.6 版 matplotlib 3.0.2 版 seaborn 0.7.1 版
import seaborn as sns; sns.set(color_codes=True)
iris = sns.load_dataset("iris")
species = iris.pop("species")
g = sns.clustermap(iris)
错误:'AttributeError: Unknown property axisbg Figure size 720x720 with 0 Axes'
解决方案
在这里工作,Spyder 3.3.1、Python 3.6.6、Qt 5.11.2、PyQt 5.11.3、Seaborn 0.9.0
跑:
pip install seaborn --upgrade
推荐阅读
- selenium - 无法启动浏览器
- python - 如何访问熊猫系列中的项目?
- wordpress - 为什么表单提交后elementor中的弹出窗口关闭?
- c++ - 如何使用 C++ 程序在 Linux 中重新加载 .bash_profile?
- typescript - 什么时候不能使用 `[key in SOME_UNION_TYPE]` 作为接口的顶级属性?
- c# - 使用实体框架进行读取/更新的列级锁定
- python-3.x - 如何避免 Django 视图的渲染功能中的长数据列表?
- python - 在函数参数中获取元组并生成一个数组
- android - 如何修复错误无法打开文件,路径 = '/storage/emulated/0/DCIM/Camera/20200818_123041.jpg'(操作系统错误:权限被拒绝,errno = 13)
- javascript - 如何使用 AJAX 和 Javascript 将多个 CSV 文件转换为多个 HTML 表