Closed
Description
Bug report
Bug summary
plt.scatter()
raises upon drawing when called with marker=''
(no errors with 3.3.0).
This change of behavior broke seaborn.
Code for reproduction
import matplotlib.pyplot as plt
plt.scatter([], [], marker='') # fails also with plt.scatter([1,2,3], [1,2,3], marker='')
plt.show()
Actual outcome
Traceback (most recent call last):
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/backends/backend_macosx.py", line 61, in _draw
self.figure.draw(renderer)
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/figure.py", line 1863, in draw
mimage._draw_list_compositing_images(
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
a.draw(renderer)
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 411, in wrapper
return func(*inner_args, **inner_kwargs)
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/axes/_base.py", line 2748, in draw
mimage._draw_list_compositing_images(renderer, self, artists)
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
a.draw(renderer)
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/collections.py", line 931, in draw
Collection.draw(self, renderer)
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/collections.py", line 385, in draw
extents = paths[0].get_extents(combined_transform)
File "/Users/maoz/.local/lib/python3.8/site-packages/matplotlib/path.py", line 603, in get_extents
return Bbox([xys.min(axis=0), xys.max(axis=0)])
File "/Users/maoz/miniconda/envs/seaborn_devenv/lib/python3.8/site-packages/numpy/core/_methods.py", line 43, in _amin
return umr_minimum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation minimum which has no identity
Expected outcome
Not to fail.
Matplotlib version
- Operating system: MacOS
- Matplotlib version: 3.3.1
- Matplotlib backend (
print(matplotlib.get_backend())
): MacOSX (also reproduces with %inline) - Python version: 3.8.3
- Jupyter version (if applicable):
- Other libraries: numpy 1.19.1
matplotlib installed through pip