【发布时间】:2020-10-16 07:37:11
【问题描述】:
我正在尝试了解 seaborn 函数。我试图执行 jupyterLab 2.2.6 上 seaborn 网站上出现的联合图函数
https://seaborn.pydata.org/generated/seaborn.jointplot.html#seaborn.jointplot
代码如下:
import seaborn as sns
penguins = sns.load_dataset("penguins")
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", hue="species")
尝试这个我在屏幕上得到一个空白图和一条错误消息,内容如下:
AttributeError: 'PathCollection' object has no property 'hue'
我该如何解决这个问题?
【问题讨论】:
-
你用的seaborn是什么版本的?
-
显然我使用的是 seaborn 0.10,这个功能是在 seaborn 0.11 中添加的