title: python matplotlib yaxis shifting image
body: <p>I am producing an image such as the following in Python3.6:</p>
  
  <p><a href="https://i.stack.imgur.com/l1hVa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l1hVa.png" alt="enter image description here"></a></p>
  
  <p>via the following code:</p>
  
  <pre><code># What file are we reading in?
  file2read0 = "/path0/" + yyyy + '_' + monthy + '.npy'
  file2read1 = "/path1/" + yyyy + '_' + monthy + '.npy'
  file2read2 = "/path2/" + yyyy + '_' + monthy + '.npy'
  file2read3 = "/path3/" + yyyy + '_' + monthy + '.npy'
  file2read4 = "/path4/" + yyyy + '_' + monthy + '.npy'
  
  # Read the files!
  data0 = np.load(file2read0,allow_pickle=True)
  data1 = np.load(file2read1,allow_pickle=True)
  data2 = np.load(file2read2,allow_pickle=True)
  data3 = np.load(file2read3,allow_pickle=True)
  data4 = np.load(file2read4,allow_pickle=True)
  
  alldata = np.vstack([data0,data1])
  alldata = np.vstack([alldata,data2])
  alldata = np.vstack([alldata,data3])
  alldata = np.vstack([alldata,data4])
  alldata = alldata.astype(int)
  
  fig,ax = plt.subplots()
  im = ax.imshow(alldata)
  
  ax.set_xticks(np.arange(len(dayy)))
  ax.set_xticklabels(dayy)
  plt.setp(ax.get_xticklabels(), rotation=45, ha="right", rotation_mode="anchor")
  
  for i in range(0,5):
      for j in range(0,len(dayy)):
          text = ax.text(j,i,alldata[i,j], ha="center",va="center",color="w")
  </code></pre>
  
  <p>This code does a vast majority of what I want done. The problem now is I want to alter the text on the yaxis. I want each row to have a ytick, and have a label associated with it (let's just say path0, path2, ... , path4) via the following code (similar to above, just now with the yaxis):</p>
  
  <pre><code>ax.set_yticks(np.arange(5))
  ax.set_yticklabels(["path0","path1","path2","path3","path4"])
  plt.setp(ax.get_yticklabels(), rotation=45, ha="right", rotation_mode="anchor")
  </code></pre>
  
  <p>I get the following:</p>
  
  <p><a href="https://i.stack.imgur.com/sMoT7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sMoT7.png" alt="enter image description here"></a></p>
  
  <p>I would like to know why this is happening, and how to best remedy this so the bottom/top halves of the data are not chopped off with the added text?</p>