<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto"><code class="notranslate">imshow</code> behaviour change between matplotlib 3.1.0 and 3.1.1; y-axis is chopped-off in 3.1.1.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<p dir="auto">Run this in matplotlib 3.1.0 and 3.1.1.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import matplotlib.pyplot as plt
xy = [&quot;1&quot;, &quot;2&quot;]
fig, ax = plt.subplots()
im = ax.imshow(np.array([[0.8, 0.0], [0.1, 6.3]]))
ax.set_xticks(np.arange(len(xy)))
ax.set_yticks(np.arange(len(xy)))
ax.set_xticklabels(xy)
ax.set_yticklabels(xy)
plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-s1">xy</span> <span class="pl-c1">=</span> [<span class="pl-s">"1"</span>, <span class="pl-s">"2"</span>]
<span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>()
<span class="pl-s1">im</span> <span class="pl-c1">=</span> <span class="pl-s1">ax</span>.<span class="pl-en">imshow</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>([[<span class="pl-c1">0.8</span>, <span class="pl-c1">0.0</span>], [<span class="pl-c1">0.1</span>, <span class="pl-c1">6.3</span>]]))
<span class="pl-s1">ax</span>.<span class="pl-en">set_xticks</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-en">len</span>(<span class="pl-s1">xy</span>)))
<span class="pl-s1">ax</span>.<span class="pl-en">set_yticks</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-en">len</span>(<span class="pl-s1">xy</span>)))
<span class="pl-s1">ax</span>.<span class="pl-en">set_xticklabels</span>(<span class="pl-s1">xy</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">set_yticklabels</span>(<span class="pl-s1">xy</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto">This is a simplified version from the first figure on</p>
<ul dir="auto">
<li><a href="https://matplotlib.org/3.1.0/gallery/images_contours_and_fields/image_annotated_heatmap.html" rel="nofollow">https://matplotlib.org/3.1.0/gallery/images_contours_and_fields/image_annotated_heatmap.html</a></li>
<li><a href="https://matplotlib.org/3.1.1/gallery/images_contours_and_fields/image_annotated_heatmap.html" rel="nofollow">https://matplotlib.org/3.1.1/gallery/images_contours_and_fields/image_annotated_heatmap.html</a></li>
</ul>
<p dir="auto">where the difference can also be observed.</p>
<p dir="auto"><strong>Actual outcome</strong></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8020943/64786732-668b4480-d56f-11e9-865e-5d1a85db45fa.png"><img src="https://user-images.githubusercontent.com/8020943/64786732-668b4480-d56f-11e9-865e-5d1a85db45fa.png" alt="3-1-1" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8020943/64786747-7014ac80-d56f-11e9-80f1-7ecb1605fb24.png"><img src="https://user-images.githubusercontent.com/8020943/64786747-7014ac80-d56f-11e9-80f1-7ecb1605fb24.png" alt="3-1-0" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating system: Linux</li>
<li>Matplotlib version: v3.1.0 vs v3.1.1</li>
<li>Matplotlib backend: Qt5Agg</li>
<li>Python version: 3.7</li>
</ul>
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">The very top and bottom of the heatmaps are getting truncated to 1/2 height in version <code class="notranslate">3.1.1</code>. This does not happen for version <code class="notranslate">3.0.3</code>.</p>
<p dir="auto">This is the code from a Jupyter Notebook</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib
import pandas as pd
import numpy as np
import seaborn as sb
%pylab inline

print(matplotlib.__version__)
print(sb.__version__)

grid = pd.DataFrame(np.arange(9).reshape((3,3))/10)
fig, ax = subplots(1, 1, figsize=(5, 5))

sb.heatmap(grid, annot=True, fmt=&quot;.0f&quot;, ax=ax, cmap='RdBu',  vmin=0, vmax=1, cbar=True);"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>
<span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">seaborn</span> <span class="pl-k">as</span> <span class="pl-s1">sb</span>
<span class="pl-c1">%</span><span class="pl-s1">pylab</span> <span class="pl-s1">inline</span>

<span class="pl-en">print</span>(<span class="pl-s1">matplotlib</span>.<span class="pl-s1">__version__</span>)
<span class="pl-en">print</span>(<span class="pl-s1">sb</span>.<span class="pl-s1">__version__</span>)

<span class="pl-s1">grid</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">9</span>).<span class="pl-en">reshape</span>((<span class="pl-c1">3</span>,<span class="pl-c1">3</span>))<span class="pl-c1">/</span><span class="pl-c1">10</span>)
<span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-en">subplots</span>(<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">5</span>, <span class="pl-c1">5</span>))

<span class="pl-s1">sb</span>.<span class="pl-en">heatmap</span>(<span class="pl-s1">grid</span>, <span class="pl-s1">annot</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">fmt</span><span class="pl-c1">=</span><span class="pl-s">".0f"</span>, <span class="pl-s1">ax</span><span class="pl-c1">=</span><span class="pl-s1">ax</span>, <span class="pl-s1">cmap</span><span class="pl-c1">=</span><span class="pl-s">'RdBu'</span>,  <span class="pl-s1">vmin</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">vmax</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">cbar</span><span class="pl-c1">=</span><span class="pl-c1">True</span>);</pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Populating the interactive namespace from numpy and matplotlib
3.1.1
0.9.0"><pre class="notranslate"><code class="notranslate">Populating the interactive namespace from numpy and matplotlib
3.1.1
0.9.0
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1696066/60530345-87f5c780-9cc6-11e9-9e31-a251283f3f7e.png"><img src="https://user-images.githubusercontent.com/1696066/60530345-87f5c780-9cc6-11e9-9e31-a251283f3f7e.png" alt="download" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system: Ubuntu Linux</li>
<li>Matplotlib version: 3.1.1</li>
<li>Matplotlib backend: module://ipykernel.pylab.backend_inline</li>
<li>Python version: 3.6</li>
<li>Jupyter version (if applicable): 4.4.0</li>
<li>Other libraries:</li>
</ul>