Title: Feature request: show bars in plt.hist · Issue #12874 · matplotlib/matplotlib · GitHub
Open Graph Title: Feature request: show bars in plt.hist · Issue #12874 · matplotlib/matplotlib
X Title: Feature request: show bars in plt.hist · Issue #12874 · matplotlib/matplotlib
Description: Feature request Summary With the new style of plotting (after version 1.5), you cannot distinguish the bars on plt.hist. Take for example the old way: import matplotlib.pyplot as plt import random l_n = [] for _ in range(2000): l_n.appen...
Open Graph Description: Feature request Summary With the new style of plotting (after version 1.5), you cannot distinguish the bars on plt.hist. Take for example the old way: import matplotlib.pyplot as plt import random ...
X Description: Feature request Summary With the new style of plotting (after version 1.5), you cannot distinguish the bars on plt.hist. Take for example the old way: import matplotlib.pyplot as plt import random ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/12874
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature request: show bars in plt.hist","articleBody":"### Feature request\r\n\r\n**Summary**\r\n\r\nWith the new style of plotting (after version 1.5), you cannot distinguish the bars on `plt.hist`. Take for example the old way:\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport random\r\n\r\nl_n = []\r\nfor _ in range(2000):\r\n l_n.append(random.betavariate(5, 25))\r\n\r\nwith plt.style.context('classic'):\r\n plt.hist(l_n, bins=20)\r\n plt.show()\r\n```\r\n\r\nUnfortunately, I cannot upload images. Nevertheless, you can see the bars. Now, this:\r\n\r\n```python\r\nplt.hist(l_n, bins=20)\r\nplt.show()\r\n```\r\n\r\nYou only see the silhouette of the histogram, not the bars. An easy way to solve this:\r\n\r\n```python\r\nplt.hist(l_n, bins=20, edgecolor='w')\r\nplt.show()\r\n```\r\n\r\n`edgecolor='w'` would be the default option (I would prefer white because it looks good with all the styles). What do you think?\r\n\r\n By the way, if you want to compare with other software, I think all of them show bars. And a quick search [shows](https://www.google.com/search?q=histogram\u0026num=50\u0026source=lnms\u0026tbm=isch\u0026sa=X\u0026ved=0ahUKEwjVi47amOzeAhUHuVkKHYdhA8wQ_AUIDigB\u0026biw=1366\u0026bih=672)...\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: Ubuntu 16.04.5 LTS\r\n * Matplotlib version: 3.0.1\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): Qt5Agg\r\n * Python version: 3.6.6\r\n * Jupyter version (if applicable): 7.1.1\r\n * Other libraries: \r\n * How I installed matplotlib: conda\r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\n","author":{"url":"https://github.com/rosgori","@type":"Person","name":"rosgori"},"datePublished":"2018-11-24T04:28:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/12874/matplotlib/issues/12874"}
| 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:7752a659-4252-1e60-ea6e-f83a5c74de99 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E34E:2D0A3F:A7EA9:E05CF:6A5321CE |
| html-safe-nonce | dfb8336c279b2db8760134cf11472a34c0dc29868f9b0ab0a5c66567773b7359 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzRFOjJEMEEzRjpBN0VBOTpFMDVDRjo2QTUzMjFDRSIsInZpc2l0b3JfaWQiOiI1NjY0MDg3Njg1MDIwNzIxNjE0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e0cba7b99ed02602b80ffdab32fec73f1dd7668dfbb04ed8acc90c0419dba7d2 |
| hovercard-subject-tag | issue:383958193 |
| 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/12874/issue_layout |
| twitter:image | https://opengraph.githubassets.com/89cecc72d498dac876f2365fb8517913a023f372d29bcf3540a48498dfad4a08/matplotlib/matplotlib/issues/12874 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/89cecc72d498dac876f2365fb8517913a023f372d29bcf3540a48498dfad4a08/matplotlib/matplotlib/issues/12874 |
| og:image:alt | Feature request Summary With the new style of plotting (after version 1.5), you cannot distinguish the bars on plt.hist. Take for example the old way: import matplotlib.pyplot as plt import random ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rosgori |
| 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