我创建了一个函数来使用 distplot 绘制多个列,但它现在看起来已经贬值了。错误:请调整您的代码以使用displot
(具有类似灵活性的图形级函数)或histplot
(直方图的轴级函数)。
有人可以帮我更新此代码。这是代码:
def creating_distplot(size,data,features):
plt.figure(figsize=size)
for i in range(len(features)):
plt.subplot(5,3,i +1)
sns.distplot(data[features[i]])
num_vars = ad_df.select_dtypes(exclude=['object', 'datetime64']).columns
creating_distplot((16,18), ad_df, num_vars)