title: Change values on matplotlib imshow() graph axis
body: <p>Say I have some input data:</p>
  
  <pre><code>data = np.random.normal(loc=100,scale=10,size=(500,1,32))
  hist = np.ones((32,20)) # initialise hist
  for z in range(32):
      hist[z],edges = np.histogram(data[:,0,z],bins=np.arange(80,122,2))
  </code></pre>
  
  <p>I can plot it using <code>imshow()</code>:</p>
  
  <pre><code>plt.imshow(hist,cmap='Reds')
  </code></pre>
  
  <p>getting: </p>
  
  <p><img src="https://i.stack.imgur.com/S8LQF.png" alt="enter image description here"></p>
  
  <p>However, the x-axis values do not match the input data (i.e. mean of 100, range from 80 to 122). Therefore, I'd like to change the x-axis to show the values in <code>edges</code>.</p>
  
  <p>I have tried:</p>
  
  <pre><code>ax = plt.gca()
  ax.set_xlabel([80,122]) # range of values in edges
  ...
  # this shifts the plot so that nothing is visible
  </code></pre>
  
  <p>and </p>
  
  <pre><code>ax.set_xticklabels(edges)
  ...
  # this labels the axis but does not centre around the mean:
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/pWeOf.png" alt="enter image description here"></p>
  
  <p>Any ideas on how I can change the axis values to reflect the input data I am using?</p>