相关疑难解决方法(0)

seaborn FutureWarning:将以下变量作为关键字参数传递:x, y

我想绘制一个seaborn regplot。我的代码:

x=data['Healthy life expectancy']
y=data['max_dead']
sns.regplot(x,y)
plt.show()
Run Code Online (Sandbox Code Playgroud)

然而,这给了我未来的警告错误。如何修复此警告?

FutureWarning: Pass the following variables as keyword args: x, y. From version 0.12, the only valid 
positional argument will be 'data', and passing other arguments without an explicit keyword will 
result in an error or misinterpretation.
Run Code Online (Sandbox Code Playgroud)

python plot seaborn

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

plot ×1

python ×1

seaborn ×1