<p dir="auto">I'm not certain if this is a regression in matplotlib or a bug in seaborn, but a user reported this difference with seaborn between matplotlib 3.0 and 3.1 (<a href="https://github.com/googlecolab/colabtools/issues/828" data-hovercard-type="issue" data-hovercard-url="/googlecolab/colabtools/issues/828/hovercard">original issue</a>):</p>
<p dir="auto">Example code:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import pandas as pd
import seaborn as sns

np.random.seed(0)
data = pd.DataFrame(np.random.randint(0, 10, (10, 10)))
sns.heatmap(data, annot=True);"><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">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-k">import</span> <span class="pl-s1">seaborn</span> <span class="pl-k">as</span> <span class="pl-s1">sns</span>

<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">seed</span>(<span class="pl-c1">0</span>)
<span class="pl-s1">data</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-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-c1">0</span>, <span class="pl-c1">10</span>, (<span class="pl-c1">10</span>, <span class="pl-c1">10</span>)))
<span class="pl-s1">sns</span>.<span class="pl-en">heatmap</span>(<span class="pl-s1">data</span>, <span class="pl-s1">annot</span><span class="pl-c1">=</span><span class="pl-c1">True</span>);</pre></div>
<p dir="auto">Output in matplotlib 3.0:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/781659/68062974-f5dcea80-fcca-11e9-87ce-afdf24151e79.png"><img src="https://user-images.githubusercontent.com/781659/68062974-f5dcea80-fcca-11e9-87ce-afdf24151e79.png" alt="seaborn-2" style="max-width: 100%;"></a></p>
<p dir="auto">Output in matplotlib 3.1:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/781659/68062976-f8d7db00-fcca-11e9-9aa4-dca8800f38b8.png"><img src="https://user-images.githubusercontent.com/781659/68062976-f8d7db00-fcca-11e9-9aa4-dca8800f38b8.png" alt="seaborn-1" style="max-width: 100%;"></a></p>
<p dir="auto">With <code class="notranslate">seaborn 0.9.0</code> and <code class="notranslate">matplotlib 3.1.1</code>, the topmost and bottommost row of boxes in a <code class="notranslate">seaborn</code> plot are partially cut off:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import seaborn as sns
import numpy as np

np.random.seed(42)
sns.heatmap(np.random.random((10, 10)))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">seaborn</span> <span class="pl-k">as</span> <span class="pl-s1">sns</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-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">seed</span>(<span class="pl-c1">42</span>)
<span class="pl-s1">sns</span>.<span class="pl-en">heatmap</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">random</span>((<span class="pl-c1">10</span>, <span class="pl-c1">10</span>)))</pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3466341/60834654-24204280-a18f-11e9-9212-b792c4f1a7a4.png"><img src="https://user-images.githubusercontent.com/3466341/60834654-24204280-a18f-11e9-9212-b792c4f1a7a4.png" alt="heatmap" style="max-width: 100%;"></a></p>
<p dir="auto">As another example, consider this <a href="https://seaborn.pydata.org/examples/heatmap_annotation.html" rel="nofollow">demo from the gallery</a>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import seaborn as sns
sns.set()

# Load the example flights dataset and conver to long-form
flights_long = sns.load_dataset(&quot;flights&quot;)
flights = flights_long.pivot(&quot;month&quot;, &quot;year&quot;, &quot;passengers&quot;)

# Draw a heatmap with the numeric values in each cell
f, ax = plt.subplots(figsize=(9, 6))
sns.heatmap(flights, annot=True, fmt=&quot;d&quot;, linewidths=.5, ax=ax)"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt
import seaborn as sns
sns.set()

# Load the example flights dataset and conver to long-form
flights_long = sns.load_dataset("flights")
flights = flights_long.pivot("month", "year", "passengers")

# Draw a heatmap with the numeric values in each cell
f, ax = plt.subplots(figsize=(9, 6))
sns.heatmap(flights, annot=True, fmt="d", linewidths=.5, ax=ax)
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3466341/60834759-6a75a180-a18f-11e9-81fc-8dc659e4f0e6.png"><img src="https://user-images.githubusercontent.com/3466341/60834759-6a75a180-a18f-11e9-81fc-8dc659e4f0e6.png" alt="heatmap" style="max-width: 100%;"></a></p>
<p dir="auto">This is a pretty major visual issue. Apologies if this has been reported before, but I couldn't find a record of such in the GH issues.</p>