Closed as not planned
Description
Bug summary
plt.hist
with bin='auto'
struggles when the data has a long tail. This was discovered in the context of levy
- and levy_l
- distributed data (see scipy/scipy#14563), but I've included a pathological example below.
Code for reproduction
# natural example
from scipy.stats import levy_l
import matplotlib.pyplot as plt
r = levy_l().rvs(size=1000)
plt.hist(r, bins='auto')
# pathological example
plt.hist([1, 2, 3, 4, 1e6], bins='auto')
Actual outcome
Very-long execution, hanging, or crashing depending on the specific example. Once I got a memory error, I think.
Expected outcome
A plot
Additional information
Operating system
Windows
Matplotlib Version
3.5.2
Matplotlib Backend
module://matplotlib_inline.backend_inline
Python version
3.10.5
Jupyter version
NA
Installation
conda