Leockl
Leockl

Reputation: 2156

Heatmap of correlation matrix using seaborn not displaying properly at the top and bottom row

I ran the following code:

import matplotlib.pyplot as plt
import seaborn as sns

plt.figure(figsize = (10, 8))
sns.heatmap(df_corr.drop(['Revenue'], axis = 1).corr(), cmap="RdYlGn")
plt.suptitle("Pearson Correlation Heatmap")
plt.show()

to produce the correlation heatmap below: corrheatmap

But if you look at the top and bottom rows, you can see only half a box is displayed at the top and bottom rows. How do I get it to display the full box at the top and bottom rows? I have tried to change figsize but it didn't work.

Many thanks.

Upvotes: 0

Views: 2554

Answers (1)

sentence
sentence

Reputation: 8913

Upgrading matplotlib to the last version (3.1.3) should solve the issue.

  • using anaconda: conda update matplotlib
  • using pip: pip install -U matplotlib

Upvotes: 1

Related Questions