Python pyplot x-axis label rotation

Viewed 5061

I am trying to rotate the xaxis labels but the xticks function below has no effect and the labels overwrite each other

import matplotlib.pyplot as plt
import seaborn as sns
     corrmat = X.corr()
     plt.xticks(rotation=90)       
     plt.figure(figsize=(15,16))          
     ax = sns.heatmap(corrmat, vmin=0, vmax=1)
     ax.xaxis.tick_top()

Jumbled xaxis

After using suggested code changes: I get the following but I still want to increase the size of the heatmap

How to increase the size of this heatmap

1 Answers
Related