0

I've created an sns heatmap and the lower, as well as the upper row, gets cut off. Is there a way to prevent this from happening? Here is the code:

p = 5 #number of variables for heatmap
Fulldfcorr = Fulldf.corr()
largestcorr = Fulldfcorr.nlargest(p, 'SalePrice')['SalePrice'].index
largestcorr

corrvalues = np.corrcoef(Fulldf[largestcorr].values.T)
plt.subplots(figsize=(8,8))
sns.set(font_scale=0.80)
Plot_3 = sns.heatmap(corrvalues, cbar=True, annot=True, square=True, fmt='.2f',
                     annot_kws={'size': 10}, yticklabels=largestcorr.values, xticklabels=largestcorr.values,linewidths=.5)
Plot_3
Alarm-1202
  • 78
  • 2
  • 10
  • 2
    Can you post the code you are using and the example of the image where the cut-off is visible? – jcaliz Apr 18 '20 at 03:29
  • Please also add sample data (e.g. random integers) to your example. – Joe Apr 18 '20 at 05:32
  • This is a standard `matplotlib`/`seaborn` question and has nothing to do with `machine-learning` - kindly do not spam irrelevant tags (removed). – desertnaut Apr 18 '20 at 10:59

0 Answers0