Title: [Bug]: Pie chart with 0 array crashes · Issue #23630 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Pie chart with 0 array crashes · Issue #23630 · matplotlib/matplotlib
X Title: [Bug]: Pie chart with 0 array crashes · Issue #23630 · matplotlib/matplotlib
Description: Bug summary After upgrading version from 3.3.4 to 3.5.2, pie chart generation crashes with [0,0] data. With v3.3.4, pie chart shows empty chart. But on 3.5.2, it crashes with error cannot convert float NaN to integer. Code for reproducti...
Open Graph Description: Bug summary After upgrading version from 3.3.4 to 3.5.2, pie chart generation crashes with [0,0] data. With v3.3.4, pie chart shows empty chart. But on 3.5.2, it crashes with error cannot convert f...
X Description: Bug summary After upgrading version from 3.3.4 to 3.5.2, pie chart generation crashes with [0,0] data. With v3.3.4, pie chart shows empty chart. But on 3.5.2, it crashes with error cannot convert f...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23630
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Pie chart with 0 array crashes","articleBody":"### Bug summary\n\nAfter upgrading version from 3.3.4 to 3.5.2, pie chart generation crashes with [0,0] data.\r\n\r\nWith v3.3.4, pie chart shows empty chart.\r\n\r\n\r\nBut on 3.5.2, it crashes with error `cannot convert float NaN to integer`.\r\n\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\r\nfig1, ax1 = plt.subplots()\r\nfig1.set_size_inches(2.8, 2.8)\r\npatches, texts, autotexts = ax1.pie([0, 0])\n```\n\n\n### Actual outcome\n\ncannot convert float NaN to integer\n\n### Expected outcome\n\nChart with 0% in center\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nWindows, Ubuntu\n\n### Matplotlib Version\n\n3.5.2\n\n### Matplotlib Backend\n\nTkAgg\n\n### Python version\n\n3.8.10\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/discover59","@type":"Person","name":"discover59"},"datePublished":"2022-08-15T20:08:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/23630/matplotlib/issues/23630"}
| 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:0144b601-cfd7-b493-50b4-72d81017420c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB3A:111866:200113C:2A3CD61:6A51EBBD |
| html-safe-nonce | b73cf977ee8cc1eb0cdd69a5f06e77fe7e951862bb7cf9abb738de25cc23a428 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjNBOjExMTg2NjoyMDAxMTNDOjJBM0NENjE6NkE1MUVCQkQiLCJ2aXNpdG9yX2lkIjoiMzQ2NTY2NzQyOTk5MjA5ODc0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a791d56ddea7d08bcb5dd68f3a56fc95bd6352b2f6dc490631348c60bf8e3295 |
| hovercard-subject-tag | issue:1339439564 |
| 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/23630/issue_layout |
| twitter:image | https://opengraph.githubassets.com/98ebb169420b74a366eacd1eec9b285e2d642f969af93faa199f95a09a023cd2/matplotlib/matplotlib/issues/23630 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/98ebb169420b74a366eacd1eec9b285e2d642f969af93faa199f95a09a023cd2/matplotlib/matplotlib/issues/23630 |
| og:image:alt | Bug summary After upgrading version from 3.3.4 to 3.5.2, pie chart generation crashes with [0,0] data. With v3.3.4, pie chart shows empty chart. But on 3.5.2, it crashes with error cannot convert f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | discover59 |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width