Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Data Science
  3. Question
Data Science

How can I include labels in SNS heatmap?

Asked by Clare Matthews Feb 13, 2023 644 views 1 answer
Share

About this question

I got this matrix

120     100     80      40      20      10      5       0
120 64.21   58.20   51.20   56.37   47.00   45.61   46.86   2.16
100 62.84   57.80   50.60   51.32   39.43   39.30   42.80   0.89
80  62.62   56.20   51.20   51.61   46.23   37.20   42.20   5.32
40  62.05   52.10   44.20   48.79   42.22   35.16   41.80   1.81
20  61.65   50.90   42.30   46.23   44.83   32.70   41.50   6.24
10  59.69   50.20   40.10   40.20   44.28   32.80   39.90   12.31
5   59.05   49.20   40.60   38.90   44.10   30.80   32.80   9.91
0   56.20   49.10   40.50   38.60   36.20   32.20   31.50   0.00

I know how to plot heatmap for the values inside by specifying it as numpy array and then using

ax = sns.heatmap(nd, annot=True, fmt='g')
But can someone help me how to include the column and row labels? The column labels and row labels are given (120,100,80,42,etc.)

Your answer

1 Answer

More Data Science discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Data Science Blogs

Guides, tips and career advice on Data Science from JanBask experts.