【发布时间】:2022-01-11 10:12:10
【问题描述】:
我希望我的图形采用特定布局,这是绘制该布局的代码
fig, axes = plt.subplots(figsize=(10, 10), ncols=2, nrows=4)
for i in range(4):
for j in range(2):
if i<j:
axes[i, j].axis('off')
else:
print(i,j)
axes[i, j].hist(df1.col1,bins=20,edgecolor='k')
但我想在每个子图(总共 7 个数据集)中绘制不同的数据集(df1.col1,df2.col1,...df7.col1)。
使用此代码我应该做哪些修改来绘制它??
【问题讨论】:
-
不,这是为了方便子图布局
标签: python pandas matplotlib subplot