Seaborn jointplot kde在Jupyter上不起作用

2024-10-04 09:24:45 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试将seaborn jointplotkind="kde"一起使用,但它不起作用。我正在用Python3玩Jupyter。Seaborn是版本0.11.1

这是我的密码:

sns.jointplot(data=test_df, x = "skew", y = "vol", hue="periode", kind="kde")  

以下是错误消息:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-204-ca814b4a75a6> in <module>
>     15 
>     16 
>---> 17 sns.jointplot(data=test_df, x = "skew", y = "vol", hue="periode", kind="kde")
>     18 
>     19 
>
>~\Anaconda3\lib\site-packages\seaborn\axisgrid.py in jointplot(x, y, data, kind, stat_func, color, >height, ratio, space, dropna, xlim, ylim, joint_kws, marginal_kws, annot_kws, **kwargs)>

>NameError: name 'kdeplot' is not defined

我不理解这个问题,因为我的代码似乎与Seaborn网站上的示例相匹配,而且我有最新版本的Seaborn


Tags: test版本dfdataseabornhuesnskind