I\'m playing around with the abalone dataset from UCI\'s machine learning repository. I want to display a correlation heatmap using matplotlib and imshow.
The first
To get your labels back, you can force matplotlib to use enough xticks so that all your labels can be shown. This can be done by adding
ax1.set_xticks(np.arange(len(labels)))
ax1.set_yticks(np.arange(len(labels)))
before your statements ax1.set_xticklabels(labels,rotation=90, fontsize=10)
and ax1.set_yticklabels(labels,fontsize=10)
.
This results in the following plot: