title: Annotations not showing on colormap using matplotlib?
body: <p>I am trying to create a heatmap for my Needleman-Wunsch Algorithm, however, I can't seem to label the individual cells of the figure. The figure is pretty much how I'd like it to be, however, I am just missing the individual values in the cells. I have followed the documentation and examples for matplotlib, however, I cant seem to find the error, I'm sure it's simple but I just can't seem to spot it.</p>
  <pre><code>dna1 = [c for c in &quot;CAAAGACCTGAAGAGCCAGTGGACTCCACCCCACTTTCTGGTCTGACCAATAT&quot;]
  dna2 = [c for c in &quot;ACCACACTCTCTGGGCTGACCAATTACAGCGCTTCTACAGAACTGAAGACTCAC&quot;]
  
  fig, ax = plt.subplots(figsize=(20,20))
  im = ax.imshow(raw_data, aspect='auto')
  
  # We want to show all ticks...
  ax.set_xticks(np.arange(len(dna1)))
  ax.set_yticks(np.arange(len(dna2)))
  # ... and label them with the respective list entries
  ax.set_xticklabels(dna1)
  ax.set_yticklabels(dna2)
  
  # Rotate the tick labels and set their alignment.
  plt.setp(ax.get_xticklabels(), rotation=45, ha=&quot;right&quot;,
           rotation_mode=&quot;anchor&quot;)
  
  # Gridlines based on minor ticks
  plt.pcolormesh(raw_data, edgecolors='k', linewidth=1)
  
  # Loop over data dimensions and create text annotations.
  
  for i in range(len(dna1)):
      for j in range(len(dna2)):
          try:
              ax.text(i, j, raw_data[i, j], ha=&quot;center&quot;, va=&quot;center&quot;, color=&quot;w&quot;, fontsize = 15)
          except KeyError:
              continue
          
  
  ax.set_title(&quot;&quot;)
  plt.show()
  </code></pre>
  <p>Outputs the below:</p>
  <p><a href="https://i.stack.imgur.com/ACk1l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ACk1l.png" alt="Output" /></a></p>
  <p>Example of the raw_data:</p>
  <p><a href="https://i.stack.imgur.com/Q2YN9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q2YN9.png" alt="ex2" /></a></p>