<p dir="auto">Suddenly plotting scatterplots using the "hue" parameter throws an error.  I can't get scatterplots to work with hue regardless of dataset.</p>
<p dir="auto">See this stackoverflow topic:</p>
<p dir="auto"><a href="https://stackoverflow.com/questions/63516843/valueerror-zero-size-array-to-reduction-operation-minimum-which-has-no-identity" rel="nofollow">Stackoverflow</a></p>
<p dir="auto">The problem occurs</p>
<blockquote>
<p dir="auto">even for some of the example code snippets given on Seaborn's official site (<a href="https://seaborn.pydata.org/generated/seaborn.scatterplot.html" rel="nofollow">https://seaborn.pydata.org/generated/seaborn.scatterplot.html</a>).</p>
</blockquote>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
tips = sns.load_dataset(&quot;tips&quot;)
ax = sns.scatterplot(x=&quot;total_bill&quot;, y=&quot;tip&quot;, data=tips)"><pre class="notranslate"><code class="notranslate">import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
tips = sns.load_dataset("tips")
ax = sns.scatterplot(x="total_bill", y="tip", data=tips)
</code></pre></div>
<p dir="auto">The code above produces this traceback:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
~\Miniconda3\envs\forge\lib\site-packages\IPython\core\formatters.py in __call__(self, obj)
    339                 pass
    340             else:
--&gt; 341                 return printer(obj)
    342             # Finally look for special method names
    343             method = get_real_method(obj, self.print_method)

~\Miniconda3\envs\forge\lib\site-packages\IPython\core\pylabtools.py in &lt;lambda&gt;(fig)
    246 
    247     if 'png' in formats:
--&gt; 248         png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
    249     if 'retina' in formats or 'png2x' in formats:
    250         png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs))

~\Miniconda3\envs\forge\lib\site-packages\IPython\core\pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs)
    130         FigureCanvasBase(fig)
    131 
--&gt; 132     fig.canvas.print_figure(bytes_io, **kw)
    133     data = bytes_io.getvalue()
    134     if fmt == 'svg':

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, pad_inches, bbox_extra_artists, backend, **kwargs)
   2191                            else suppress())
   2192                     with ctx:
-&gt; 2193                         self.figure.draw(renderer)
   2194 
   2195                     bbox_inches = self.figure.get_tightbbox(

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     39                 renderer.start_filter()
     40 
---&gt; 41             return draw(artist, renderer, *args, **kwargs)
     42         finally:
     43             if artist.get_agg_filter() is not None:

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\figure.py in draw(self, renderer)
   1862             self.patch.draw(renderer)
   1863             mimage._draw_list_compositing_images(
-&gt; 1864                 renderer, self, artists, self.suppressComposite)
   1865 
   1866             renderer.close_group('figure')

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    129     if not_composite or not has_images:
    130         for a in artists:
--&gt; 131             a.draw(renderer)
    132     else:
    133         # Composite any adjacent images together

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     39                 renderer.start_filter()
     40 
---&gt; 41             return draw(artist, renderer, *args, **kwargs)
     42         finally:
     43             if artist.get_agg_filter() is not None:

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\cbook\deprecation.py in wrapper(*inner_args, **inner_kwargs)
    409                          else deprecation_addendum,
    410                 **kwargs)
--&gt; 411         return func(*inner_args, **inner_kwargs)
    412 
    413     return wrapper

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\axes\_base.py in draw(self, renderer, inframe)
   2746             renderer.stop_rasterizing()
   2747 
-&gt; 2748         mimage._draw_list_compositing_images(renderer, self, artists)
   2749 
   2750         renderer.close_group('axes')

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    129     if not_composite or not has_images:
    130         for a in artists:
--&gt; 131             a.draw(renderer)
    132     else:
    133         # Composite any adjacent images together

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     39                 renderer.start_filter()
     40 
---&gt; 41             return draw(artist, renderer, *args, **kwargs)
     42         finally:
     43             if artist.get_agg_filter() is not None:

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\collections.py in draw(self, renderer)
    929     def draw(self, renderer):
    930         self.set_sizes(self._sizes, self.figure.dpi)
--&gt; 931         Collection.draw(self, renderer)
    932 
    933 

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     39                 renderer.start_filter()
     40 
---&gt; 41             return draw(artist, renderer, *args, **kwargs)
     42         finally:
     43             if artist.get_agg_filter() is not None:

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\collections.py in draw(self, renderer)
    383             else:
    384                 combined_transform = transform
--&gt; 385             extents = paths[0].get_extents(combined_transform)
    386             if (extents.width &lt; self.figure.bbox.width
    387                     and extents.height &lt; self.figure.bbox.height):

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\path.py in get_extents(self, transform, **kwargs)
    601                 xys.append(curve([0, *dzeros, 1]))
    602             xys = np.concatenate(xys)
--&gt; 603         return Bbox([xys.min(axis=0), xys.max(axis=0)])
    604 
    605     def intersects_path(self, other, filled=True):

~\Miniconda3\envs\forge\lib\site-packages\numpy\core\_methods.py in _amin(a, axis, out, keepdims, initial, where)
     41 def _amin(a, axis=None, out=None, keepdims=False,
     42           initial=_NoValue, where=True):
---&gt; 43     return umr_minimum(a, axis, None, out, keepdims, initial, where)
     44 
     45 def _sum(a, axis=None, dtype=None, out=None, keepdims=False,

ValueError: zero-size array to reduction operation minimum which has no identity

&lt;Figure size 432x288 with 1 Axes&gt;"><pre class="notranslate"><code class="notranslate">---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
~\Miniconda3\envs\forge\lib\site-packages\IPython\core\formatters.py in __call__(self, obj)
    339                 pass
    340             else:
--&gt; 341                 return printer(obj)
    342             # Finally look for special method names
    343             method = get_real_method(obj, self.print_method)

~\Miniconda3\envs\forge\lib\site-packages\IPython\core\pylabtools.py in &lt;lambda&gt;(fig)
    246 
    247     if 'png' in formats:
--&gt; 248         png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
    249     if 'retina' in formats or 'png2x' in formats:
    250         png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs))

~\Miniconda3\envs\forge\lib\site-packages\IPython\core\pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs)
    130         FigureCanvasBase(fig)
    131 
--&gt; 132     fig.canvas.print_figure(bytes_io, **kw)
    133     data = bytes_io.getvalue()
    134     if fmt == 'svg':

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, pad_inches, bbox_extra_artists, backend, **kwargs)
   2191                            else suppress())
   2192                     with ctx:
-&gt; 2193                         self.figure.draw(renderer)
   2194 
   2195                     bbox_inches = self.figure.get_tightbbox(

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     39                 renderer.start_filter()
     40 
---&gt; 41             return draw(artist, renderer, *args, **kwargs)
     42         finally:
     43             if artist.get_agg_filter() is not None:

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\figure.py in draw(self, renderer)
   1862             self.patch.draw(renderer)
   1863             mimage._draw_list_compositing_images(
-&gt; 1864                 renderer, self, artists, self.suppressComposite)
   1865 
   1866             renderer.close_group('figure')

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    129     if not_composite or not has_images:
    130         for a in artists:
--&gt; 131             a.draw(renderer)
    132     else:
    133         # Composite any adjacent images together

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     39                 renderer.start_filter()
     40 
---&gt; 41             return draw(artist, renderer, *args, **kwargs)
     42         finally:
     43             if artist.get_agg_filter() is not None:

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\cbook\deprecation.py in wrapper(*inner_args, **inner_kwargs)
    409                          else deprecation_addendum,
    410                 **kwargs)
--&gt; 411         return func(*inner_args, **inner_kwargs)
    412 
    413     return wrapper

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\axes\_base.py in draw(self, renderer, inframe)
   2746             renderer.stop_rasterizing()
   2747 
-&gt; 2748         mimage._draw_list_compositing_images(renderer, self, artists)
   2749 
   2750         renderer.close_group('axes')

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    129     if not_composite or not has_images:
    130         for a in artists:
--&gt; 131             a.draw(renderer)
    132     else:
    133         # Composite any adjacent images together

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     39                 renderer.start_filter()
     40 
---&gt; 41             return draw(artist, renderer, *args, **kwargs)
     42         finally:
     43             if artist.get_agg_filter() is not None:

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\collections.py in draw(self, renderer)
    929     def draw(self, renderer):
    930         self.set_sizes(self._sizes, self.figure.dpi)
--&gt; 931         Collection.draw(self, renderer)
    932 
    933 

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     39                 renderer.start_filter()
     40 
---&gt; 41             return draw(artist, renderer, *args, **kwargs)
     42         finally:
     43             if artist.get_agg_filter() is not None:

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\collections.py in draw(self, renderer)
    383             else:
    384                 combined_transform = transform
--&gt; 385             extents = paths[0].get_extents(combined_transform)
    386             if (extents.width &lt; self.figure.bbox.width
    387                     and extents.height &lt; self.figure.bbox.height):

~\Miniconda3\envs\forge\lib\site-packages\matplotlib\path.py in get_extents(self, transform, **kwargs)
    601                 xys.append(curve([0, *dzeros, 1]))
    602             xys = np.concatenate(xys)
--&gt; 603         return Bbox([xys.min(axis=0), xys.max(axis=0)])
    604 
    605     def intersects_path(self, other, filled=True):

~\Miniconda3\envs\forge\lib\site-packages\numpy\core\_methods.py in _amin(a, axis, out, keepdims, initial, where)
     41 def _amin(a, axis=None, out=None, keepdims=False,
     42           initial=_NoValue, where=True):
---&gt; 43     return umr_minimum(a, axis, None, out, keepdims, initial, where)
     44 
     45 def _sum(a, axis=None, dtype=None, out=None, keepdims=False,

ValueError: zero-size array to reduction operation minimum which has no identity

&lt;Figure size 432x288 with 1 Axes&gt;
</code></pre></div>
<p dir="auto"><strong>Using seaborn 0.10.1 and notebook 6.1.3</strong></p>
<p dir="auto">Output of pd.show_versions():</p>
<h2 dir="auto"><strong>INSTALLED VERSIONS</strong></h2>
<p dir="auto">commit           : f2ca0a2665b2d169c97de87b8e778dbed86aea07<br>
python           : 3.7.9.final.0<br>
python-bits      : 64<br>
OS               : Windows<br>
OS-release       : 10<br>
Version          : 10.0.19041<br>
machine          : AMD64<br>
processor        : Intel64 Family 6 Model 158 Stepping 9, GenuineIntel<br>
byteorder        : little<br>
LC_ALL           : None<br>
LANG             : None<br>
LOCALE           : None.None</p>
<p dir="auto">pandas           : 1.1.1<br>
numpy            : 1.19.1<br>
pytz             : 2020.1<br>
dateutil         : 2.8.1<br>
pip              : 20.2.2<br>
setuptools       : 49.6.0.post20200814<br>
Cython           : None<br>
pytest           : None<br>
hypothesis       : None<br>
sphinx           : 3.2.1<br>
blosc            : None<br>
feather          : None<br>
xlsxwriter       : None<br>
lxml.etree       : 4.5.2<br>
html5lib         : None<br>
pymysql          : None<br>
psycopg2         : None<br>
jinja2           : 2.11.2<br>
IPython          : 7.18.1<br>
pandas_datareader: None<br>
bs4              : 4.9.1<br>
bottleneck       : None<br>
fsspec           : None<br>
fastparquet      : None<br>
gcsfs            : None<br>
matplotlib       : 3.3.1<br>
numexpr          : 2.7.1<br>
odfpy            : None<br>
openpyxl         : None<br>
pandas_gbq       : None<br>
pyarrow          : None<br>
pytables         : None<br>
pyxlsb           : None<br>
s3fs             : None<br>
scipy            : 1.5.2<br>
sqlalchemy       : 1.3.19<br>
tables           : 3.6.1<br>
tabulate         : None<br>
xarray           : None<br>
xlrd             : 1.2.0<br>
xlwt             : None<br>
numba            : None</p>
<p dir="auto">Matplotlib 3.3.1 has just been released and it breaks <code class="notranslate">scatterplot</code> (and <code class="notranslate">relplot(kind="scatter")</code>). The problem is the <code class="notranslate">marker=''</code> argument in the legend artists creation, which now raises an exception upon drawing (seems unintentional). See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="679140798" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/18254" data-hovercard-type="issue" data-hovercard-url="/matplotlib/matplotlib/issues/18254/hovercard" href="https://github.com/matplotlib/matplotlib/issues/18254">matplotlib/matplotlib#18254</a>. Example code:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import seaborn as sns

# Load the example mpg dataset
mpg = sns.load_dataset(&quot;mpg&quot;)

# Plot miles per gallon against horsepower with other semantics
sns.scatterplot(x=&quot;horsepower&quot;, y=&quot;mpg&quot;, hue=&quot;origin&quot;, data=mpg)"><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-c"># Load the example mpg dataset</span>
<span class="pl-s1">mpg</span> <span class="pl-c1">=</span> <span class="pl-s1">sns</span>.<span class="pl-en">load_dataset</span>(<span class="pl-s">"mpg"</span>)

<span class="pl-c"># Plot miles per gallon against horsepower with other semantics</span>
<span class="pl-s1">sns</span>.<span class="pl-en">scatterplot</span>(<span class="pl-s1">x</span><span class="pl-c1">=</span><span class="pl-s">"horsepower"</span>, <span class="pl-s1">y</span><span class="pl-c1">=</span><span class="pl-s">"mpg"</span>, <span class="pl-s1">hue</span><span class="pl-c1">=</span><span class="pl-s">"origin"</span>, <span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">mpg</span>)</pre></div>
<p dir="auto">Until upstream issue is resolved I'd advocate using matplotlib==3.3.0.</p>