<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong><br>
When doing scatter plot of <code class="notranslate">nan</code> values it crashes because the list of colors gets overwriten to an empty list by this line:</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/matplotlib/matplotlib/blob/c921e2ead5a9b8ea3dabf74c9aee3958eecfc01e/lib/mpl_toolkits/mplot3d/axes3d.py#L2317">matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 2317
      in
      <a data-pjax="true" class="commit-tease-sha" href="/matplotlib/matplotlib/commit/c921e2ead5a9b8ea3dabf74c9aee3958eecfc01e">c921e2e</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L2317" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="2317"></td>
          <td id="LC2317" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">xs</span>, <span class="pl-s1">ys</span>, <span class="pl-s1">zs</span>, <span class="pl-s1">s</span>, <span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-s1">cbook</span>.<span class="pl-en">delete_masked_points</span>(<span class="pl-s1">xs</span>, <span class="pl-s1">ys</span>, <span class="pl-s1">zs</span>, <span class="pl-s1">s</span>, <span class="pl-s1">c</span>) </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto"><strong>Code for reproduction</strong><br>
We hit this bug in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="375037326" data-permission-text="Title is private" data-url="https://github.com/mne-tools/mne-python/issues/5676" data-hovercard-type="pull_request" data-hovercard-url="/mne-tools/mne-python/pull/5676/hovercard" href="https://github.com/mne-tools/mne-python/pull/5676">mne-tools/mne-python#5676</a>, but here is a MWE. Most probably this is a duplicated of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="374367401" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/12641" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/12641/hovercard" href="https://github.com/matplotlib/matplotlib/issues/12641">#12641</a>. In which case, this can be used as a test.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import numpy as np

n_points = 4
xs = ys = zs = np.full(n_points, np.nan)
colors = list(np.full(2, 'k'))
plt.scatter(xs, ys, zs, c=colors)
plt.show()"><pre class="notranslate"><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">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>

<span class="pl-s1">n_points</span> <span class="pl-c1">=</span> <span class="pl-c1">4</span>
<span class="pl-s1">xs</span> <span class="pl-c1">=</span> <span class="pl-s1">ys</span> <span class="pl-c1">=</span> <span class="pl-s1">zs</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">full</span>(<span class="pl-s1">n_points</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>)
<span class="pl-s1">colors</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-s1">np</span>.<span class="pl-en">full</span>(<span class="pl-c1">2</span>, <span class="pl-s">'k'</span>))
<span class="pl-s1">plt</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">xs</span>, <span class="pl-s1">ys</span>, <span class="pl-s1">zs</span>, <span class="pl-s1">c</span><span class="pl-c1">=</span><span class="pl-s1">colors</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">(As in matplotlib 2.2.2) we would expect an empty plot with no error</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [25]: matplotlib.__version__
Out[25]: '2.2.2'

In [26]: %paste
import matplotlib.pyplot as plt
import numpy as np

n_points = 4
xs = ys = zs = np.full(n_points, np.nan)
colors = list(np.full(2, 'k'))
plt.scatter(xs, ys, zs, c=colors)
plt.show()
## -- End pasted text --

In [27]: "><pre class="notranslate">In [25]: matplotlib.__version__
Out[25]: <span class="pl-s"><span class="pl-pds">'</span>2.2.2<span class="pl-pds">'</span></span>

In [26]: %paste
import matplotlib.pyplot as plt
import numpy as np

n_points = 4
xs = ys = zs = np.full(n_points, np.nan)
colors = list(np.full(2, <span class="pl-s"><span class="pl-pds">'</span>k<span class="pl-pds">'</span></span>))
plt.scatter(xs, ys, zs, c=colors)
<span class="pl-en">plt.show</span>()
<span class="pl-c"><span class="pl-c">#</span># -- End pasted text --</span>

In [27]: </pre></div>
<p dir="auto"><strong>Actual outcome</strong><br>
It breaks because cannot iterate over <code class="notranslate">c</code></p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [9]: matplotlib.__version__
Out[9]: '3.0.1'

In [10]: %paste
import matplotlib.pyplot as plt
import numpy as np

n_points = 4
xs = ys = zs = np.full(n_points, np.nan)
colors = list(np.full(2, 'k'))
plt.scatter(xs, ys, zs, c=colors)
plt.show()
## -- End pasted text --
Traceback (most recent call last):
  File &quot;&lt;ipython-input-10-f59e87d45c38&gt;&quot;, line 7, in &lt;module&gt;
    plt.scatter(xs, ys, zs, c=colors)
  File &quot;/home/sik/miniconda3/envs/mne/lib/python3.6/site-packages/matplotlib/pyplot.py&quot;, line 2864, in scatter
    is not None else {}), **kwargs)
  File &quot;/home/sik/miniconda3/envs/mne/lib/python3.6/site-packages/matplotlib/__init__.py&quot;, line 1805, in inner
    return func(ax, *args, **kwargs)
  File &quot;/home/sik/miniconda3/envs/mne/lib/python3.6/site-packages/matplotlib/axes/_axes.py&quot;, line 4234, in scatter
    .format(nc=n_elem, xs=x.size, ys=y.size)
ValueError: 'c' argument has 2 elements, which is not acceptable for use with 'x' with size 4, 'y' with size 4."><pre class="notranslate">In [9]: matplotlib.__version__
Out[9]: <span class="pl-s"><span class="pl-pds">'</span>3.0.1<span class="pl-pds">'</span></span>

In [10]: %paste
import matplotlib.pyplot as plt
import numpy as np

n_points = 4
xs = ys = zs = np.full(n_points, np.nan)
colors = list(np.full(2, <span class="pl-s"><span class="pl-pds">'</span>k<span class="pl-pds">'</span></span>))
plt.scatter(xs, ys, zs, c=colors)
<span class="pl-en">plt.show</span>()
<span class="pl-c"><span class="pl-c">#</span># -- End pasted text --</span>
Traceback (most recent call last):
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;ipython-input-10-f59e87d45c38&gt;<span class="pl-pds">"</span></span>, line 7, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    plt.scatter(xs, ys, zs, c=colors)
  File <span class="pl-s"><span class="pl-pds">"</span>/home/sik/miniconda3/envs/mne/lib/python3.6/site-packages/matplotlib/pyplot.py<span class="pl-pds">"</span></span>, line 2864, <span class="pl-k">in</span> scatter
    is not None <span class="pl-k">else</span> {}), <span class="pl-k">**</span>kwargs)
  File <span class="pl-s"><span class="pl-pds">"</span>/home/sik/miniconda3/envs/mne/lib/python3.6/site-packages/matplotlib/__init__.py<span class="pl-pds">"</span></span>, line 1805, <span class="pl-k">in</span> inner
    <span class="pl-k">return</span> func(ax, <span class="pl-k">*</span>args, <span class="pl-k">**</span>kwargs)
  File <span class="pl-s"><span class="pl-pds">"</span>/home/sik/miniconda3/envs/mne/lib/python3.6/site-packages/matplotlib/axes/_axes.py<span class="pl-pds">"</span></span>, line 4234, <span class="pl-k">in</span> scatter
    .format(nc=n_elem, xs=x.size, ys=y.size)
ValueError: <span class="pl-s"><span class="pl-pds">'</span>c<span class="pl-pds">'</span></span> argument has 2 elements, which is not acceptable <span class="pl-k">for</span> use with <span class="pl-s"><span class="pl-pds">'</span>x<span class="pl-pds">'</span></span> with size 4, <span class="pl-s"><span class="pl-pds">'</span>y<span class="pl-pds">'</span></span> with size 4.</pre></div>
<p dir="auto">This is a bit of a nitpick, but if you look at the <a href="http://matplotlib.org/devdocs/examples/pylab_examples/mathtext_examples.html" rel="nofollow">latest mathtext example</a>, many accents are too far to the left. It's actually a bit off in the 1.5.x docs, but perhaps not as noticeable with the other font.</p>
<p dir="auto">For example, the acute accent on the 'a' is pretty clearly too far to the left, with the bottom starting at the start of the curve, when it really should start above the middle like the grave accent. The breve, dot, umlaut, tilde and arrow arrow also just slightly to the left (though pretty reasonable.) At this size, the macron seems okay, but at a larger font size, it seems slightly to the left as well.</p>
<p dir="auto">At a guess, perhaps the location for the accents is tuned for regular text, and so is slightly to the left for math text, which is usually italic?</p>