title: display matrix values and colormap
body: <p>I need to display values of my matrix using matshow.
  However, with the code I have now I just get two matrices - one with values and other colored.
  How do I impose them? Thanks :)</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  fig, ax = plt.subplots()
  
  min_val, max_val = 0, 15
  
  for i in xrange(15):
      for j in xrange(15):
          c = intersection_matrix[i][j]
          ax.text(i+0.5, j+0.5, str(c), va='center', ha='center')
  
  plt.matshow(intersection_matrix, cmap=plt.cm.Blues)
  
  ax.set_xlim(min_val, max_val)
  ax.set_ylim(min_val, max_val)
  ax.set_xticks(np.arange(max_val))
  ax.set_yticks(np.arange(max_val))
  ax.grid()
  </code></pre>
  
  <p>Output:</p>
  
  <p><a href="https://i.stack.imgur.com/fPHMX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fPHMX.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/2rr5d.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2rr5d.png" alt="enter image description here"></a></p>