【发布时间】:2020-06-27 02:21:54
【问题描述】:
如何将所有解释变量的多散点图拉到 python 中的响应变量。生成的错误如下,无论我将挤压设置为真还是假。 TypeError: 'AxesSubplot' 对象不可下标
f, axes = plt.subplots(6, 4, figsize=(20, 20), sharex=False, squeeze=False)
for i,col in enumerate(chef_num.columns[1:]):
sns.scatterplot(x=chef_num[col], y=chef_num['REVENUE'], ax=ax[i])
【问题讨论】:
-
什么是
ax?错误是由ax[i]引起的。我假设它是一个轴,因此正如错误所说,它不能下标。
标签: python pandas matplotlib machine-learning seaborn