'How to make my subplots larger? I tried playing around with figsize but it just squeezes everything
This is my code:
fig, ax = plt.subplots(nrows=21, ncols=2, figsize=(15, 40))
ax = ax.ravel()
for n, col in enumerate(categorical_cols):
g = sns.boxplot(data=train_df, y=col, x=target, ax=ax[n], orient='h')
ax[n].set_title(col, fontsize=10)
g.set(xticks=[0, 100000, 200000, 300000, 400000, 500000, 600000])
g.set(xticklabels=['0k','100k','200k','300k','400k','500k','600k'])
plt.tight_layout()
I'm trying to enlarge each of the subplot but I don't get any result by increasing figsize or decreasing figsize, would appreciate any help. Thank you!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|