SyntaxFix
Write A Post
Hire A Developer
Questions
A quick fix to "plot overlap" is to use plt.tight_layout():
for i,var in enumerate(categorical_variables): plt.title(var) plt.xticks(rotation=45) df[var].hist() plt.subplot(len(categorical_variables)/2, 2, i+1) plt.tight_layout()