Title: [Bug]: `plt.hist` with `bin='auto'` struggles with `levy`-distributed points · Issue #23524 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: `plt.hist` with `bin='auto'` struggles with `levy`-distributed points · Issue #23524 · matplotlib/matplotlib
X Title: [Bug]: `plt.hist` with `bin='auto'` struggles with `levy`-distributed points · Issue #23524 · matplotlib/matplotlib
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 repr...
Open Graph 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 p...
X 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 ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23524
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: `plt.hist` with `bin='auto'` struggles with `levy`-distributed points","articleBody":"### Bug summary\r\n\r\n`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.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\n# natural example\r\nfrom scipy.stats import levy_l\r\nimport matplotlib.pyplot as plt\r\nr = levy_l().rvs(size=1000)\r\nplt.hist(r, bins='auto')\r\n\r\n# pathological example\r\nplt.hist([1, 2, 3, 4, 1e6], bins='auto')\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\nVery-long execution, hanging, or crashing depending on the specific example. Once I got a memory error, I think.\r\n\r\n### Expected outcome\r\n\r\nA plot\r\n\r\n### Additional information\r\n\r\nSee scipy/scipy#14563\r\n\r\n### Operating system\r\n\r\nWindows\r\n\r\n### Matplotlib Version\r\n\r\n3.5.2\r\n\r\n### Matplotlib Backend\r\n\r\nmodule://matplotlib_inline.backend_inline\r\n\r\n### Python version\r\n\r\n3.10.5\r\n\r\n### Jupyter version\r\n\r\nNA\r\n\r\n### Installation\r\n\r\nconda","author":{"url":"https://github.com/mdhaber","@type":"Person","name":"mdhaber"},"datePublished":"2022-07-30T20:04:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/23524/matplotlib/issues/23524"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:42f42e1e-4092-0218-19b0-678b00a8dbde |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BBF6:1B675D:53F67E:6FB443:6A52F9F0 |
| html-safe-nonce | a99e9852a2353f767b6a2c183973eaca18fc155b871be383b1aa834305999439 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkY2OjFCNjc1RDo1M0Y2N0U6NkZCNDQzOjZBNTJGOUYwIiwidmlzaXRvcl9pZCI6IjU2NzAzMDUxMjY5MjMwNDEyNjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a4481b8ebdb03938975b824dee8a1a80b500340077a11b70ae6651c13c612482 |
| hovercard-subject-tag | issue:1323272964 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/23524/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cd0efbb211ef348d0fe660a645064a51bf3d516e83fce8235689c4402190a42d/matplotlib/matplotlib/issues/23524 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cd0efbb211ef348d0fe660a645064a51bf3d516e83fce8235689c4402190a42d/matplotlib/matplotlib/issues/23524 |
| og:image:alt | 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 p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mdhaber |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width