<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">When using Jupyter notebook and matplotlib.pyplot with setting %matplotlib notebook,<br>
the plots generated only show the top left corner. One can pan and see the remaining section of the plot.</p>
<p dir="auto">Using %matplotlib inline does not have the same problem.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<p dir="auto">##any plotting code will do, a simple example is attached<br>
import matplotlib.pyplot as plt<br>
%matplotlib notebook</p>
<p dir="auto">x = np.arange(10)<br>
y = x<br>
plt.plot(x,y)</p>
<p dir="auto"><strong>Outcome</strong><br>
I am posting another user's stackoverflow result, as he already attached the outcome:<br>
<a href="https://stackoverflow.com/questions/63106366/matplotlib-notebook-magic-in-jupyter-notebook-partial-plot" rel="nofollow">https://stackoverflow.com/questions/63106366/matplotlib-notebook-magic-in-jupyter-notebook-partial-plot</a></p>
<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system: ubuntu 20.04.1</li>
<li>Matplotlib version: '3.3.0'</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): nbAgg</li>
<li>Python version: 3.8.2</li>
<li>Jupyter version (if applicable): 6.1.1</li>
<li>Other libraries:</li>
</ul>
 pip3, by having --user flag
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">A simple 3D scatter plot is not working on jupyter notebook when <code class="notranslate">%matplotlib notebook</code> is enabled. However, it is working for <code class="notranslate">%matplotlib inline</code></p>

<p dir="auto">An extremely large, blank window appears that spans beyond the page.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>

<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="%matplotlib notebook

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

A = np.random.random((100,3))
fig = plt.figure()
ax = Axes3D(fig)
ax.scatter(A[:,0], A[:,1], A[:,2])
plt.show()"><pre class="notranslate"><span class="pl-c1">%</span><span class="pl-s1">matplotlib</span> <span class="pl-s1">notebook</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">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">from</span> <span class="pl-s1">mpl_toolkits</span>.<span class="pl-s1">mplot3d</span> <span class="pl-k">import</span> <span class="pl-v">Axes3D</span>

<span class="pl-v">A</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">random</span>((<span class="pl-c1">100</span>,<span class="pl-c1">3</span>))
<span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>()
<span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-v">Axes3D</span>(<span class="pl-s1">fig</span>)
<span class="pl-s1">ax</span>.<span class="pl-en">scatter</span>(<span class="pl-v">A</span>[:,<span class="pl-c1">0</span>], <span class="pl-v">A</span>[:,<span class="pl-c1">1</span>], <span class="pl-v">A</span>[:,<span class="pl-c1">2</span>])
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto"><strong>Actual outcome</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/f3db3afac0a2629303b342241b9e2f53900bb6befb602fbd010887bf0e697b3d/68747470733a2f2f692e706f7374696d672e63632f335271516a7934662f53637265656e2d53686f742d323032302d30372d33302d61742d392d34342d35312d504d2e706e67"><img src="https://camo.githubusercontent.com/f3db3afac0a2629303b342241b9e2f53900bb6befb602fbd010887bf0e697b3d/68747470733a2f2f692e706f7374696d672e63632f335271516a7934662f53637265656e2d53686f742d323032302d30372d33302d61742d392d34342d35312d504d2e706e67" alt="Fail case" data-canonical-src="https://i.postimg.cc/3RqQjy4f/Screen-Shot-2020-07-30-at-9-44-51-PM.png" style="max-width: 100%;"></a></p>

<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">Expecting a 3D scatter plot of <code class="notranslate">A</code>.</p>


<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system: posix Darwin 19.6.0</li>
<li>Matplotlib version: 3.3.0</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): nbAgg</li>
<li>Python version: 3.7.5</li>
<li>Jupyter version (if applicable):
<ul dir="auto">
<li>jupyter core     : 4.6.3</li>
<li>jupyter-notebook : 6.0.3</li>
<li>qtconsole        : 4.7.5</li>
<li>ipython          : 7.16.1</li>
<li>ipykernel        : 5.3.4</li>
<li>jupyter client   : 6.1.6</li>
<li>jupyter lab      : not installed</li>
<li>nbconvert        : 5.6.1</li>
<li>ipywidgets       : 7.5.1</li>
<li>nbformat         : 5.0.7</li>
<li>traitlets        : 4.3.3</li>
</ul>
</li>
<li>Other libraries: numpy 1.19.1, scipy 1.5.2</li>
</ul>