python TypeError:jointplot()采用0到1个位置参数,但给出了2个位置参数(和1个仅关键字参数

dgsult0t  于 2023-03-21  发布在  Python
关注(0)|答案(1)|浏览(1538)

我哪里做错了?我来解决
plt.figure(figsize = (15,10))
sns.jointplot(data.radius_mean,data.area_mean,kind="reg") plt.show()

TypeError                                 Traceback (most recent call last)
<ipython-input-34-3a368da054ef> in <module>
      1 plt.figure(figsize = (15,10))
----> 2 sns.jointplot(data.radius_mean,data.area_mean,kind="reg")
      3 plt.show()

TypeError: jointplot() takes from 0 to 1 positional arguments but 2 positional arguments (and 1 keyword-only argument) were given
aurhwmvo

aurhwmvo1#

请查看您应该传递给seaborn.jointplot的参数。例如,您应该将列作为关键字参数xy传递。此外,您需要指定data参数:

sns.jointplot(x='radius_mean', y='area_mean', data=data, kind='reg')

相关问题