I have a pandas dataframe of shape (39, 67). When I plot it's seaborn
heatmap, I don't get as many labels on the X and Y axes. .get_xticklabels()
method also returns only 23 labels.
matplotlib
doesn't show any labels (only numbers) as well.
Both these heatmaps are for the same dataframe (39, 67).
To ensure the labels are visible, you have to set the parameters xticklabels
, yticklabels
to True
, like so.
import seaborn as sns
sns.heatmap(dataframe, xticklabels=True, yticklabels=True)
Here's the documentation for the heatmap
function.