我正在尝试创建箱线图的多个子图:
fig, axs = plt.subplots(7, 2)
for ax, feature in zip(axs.flatten(), df.columns):
title = "column: {}".format(feature)
df.boxplot(column=feature, ax=ax)
ax.set_title(title)
plt.tight_layout()
plt.show()
尝试使用时tight_layout
,我收到警告:
UserWarning: Tight layout not applied. tight_layout cannot make axes height small enough to accommodate all axes decorations
如何以可读的方式显示子图?