Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotations on heatmaps not shown for all values #3479

Closed
ellie-okay opened this issue Sep 18, 2023 · 2 comments
Closed

Annotations on heatmaps not shown for all values #3479

ellie-okay opened this issue Sep 18, 2023 · 2 comments

Comments

@ellie-okay
Copy link

Example:
https://www.tutorialspoint.com/how-to-annotate-each-cell-of-a-heatmap-in-seaborn

import seaborn as sns
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = [7.50, 3.50]
plt.rcParams["figure.autolayout"] = True
df = pd.DataFrame(np.random.random((5, 5)), columns=["a", "b", "c", "d", "e"])
sns.heatmap(df, annot=True, annot_kws={"size": 7})
plt.show()

My result on both my laptop and my desktop using VSCode and/or PyCharm Pro:
image

Similarly, the project I was working on had results like this:
image

pip list
Package         Version
--------------- ------------
contourpy       1.1.1
cycler          0.11.0
fonttools       4.42.1
kiwisolver      1.4.5
matplotlib      3.8.0
numpy           1.26.0
packaging       23.1
pandas          2.1.0
Pillow          10.0.1
pip             23.2.1
pyparsing       3.1.1
python-dateutil 2.8.2
pytz            2023.3.post1
seaborn         0.12.2
setuptools      65.5.0
six             1.16.0
tzdata          2023
@ellie-okay
Copy link
Author

I've just downgraded matplotlib to 3.7.3 and it works now.

@mwaskom
Copy link
Owner

mwaskom commented Sep 18, 2023

Duplicate of #3478

@mwaskom mwaskom marked this as a duplicate of #3478 Sep 18, 2023
@mwaskom mwaskom closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants