如何在数据帧中创建多重散点图的循环

时间:2020-03-15 19:27:49

标签: python matplotlib seaborn

我需要将所有解释性变量的散点图拉至响应变量,但出现以下错误

“ TypeError:'AxesSubplot'对象不可下标”

如何解决该问题?谢谢!

f, axes = plt.subplots(5, 4, figsize=(20, 20), sharex=False, squeeze=True)

for i,col in enumerate(df_num.columns[1:]):

    sns.scatterplot(x=df_num[col], y=df_num['REVENUE'], ax=ax[i])

0 个答案:

没有答案