Title: [Bug]: Histogram ignores `lw` argument, no warning or error · Issue #29977 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Histogram ignores `lw` argument, no warning or error · Issue #29977 · matplotlib/matplotlib
X Title: [Bug]: Histogram ignores `lw` argument, no warning or error · Issue #29977 · matplotlib/matplotlib
Description: Bug summary ax.hist ignores lw argument. Must use linewidth in order to change the thickness of the lines. Code for reproduction # Test of lw vs linewidth in histograms histogram1 = [1] histogram2 = [3] histogram3 = [5] fig, ax = plt.sub...
Open Graph Description: Bug summary ax.hist ignores lw argument. Must use linewidth in order to change the thickness of the lines. Code for reproduction # Test of lw vs linewidth in histograms histogram1 = [1] histogram2 ...
X Description: Bug summary ax.hist ignores lw argument. Must use linewidth in order to change the thickness of the lines. Code for reproduction # Test of lw vs linewidth in histograms histogram1 = [1] histogram2 ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/29977
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Histogram ignores `lw` argument, no warning or error","articleBody":"### Bug summary\n\n`ax.hist` ignores `lw` argument. Must use `linewidth` in order to change the thickness of the lines.\n\n### Code for reproduction\n\n```Python\n# Test of lw vs linewidth in histograms\n\nhistogram1 = [1]\nhistogram2 = [3]\nhistogram3 = [5]\n\nfig, ax = plt.subplots(figsize=(8, 8))\nax.hist(histogram1, bins=1, density=True, histtype='step', color='tab:blue', lw=1, label='lw=1')\nax.hist(histogram2, bins=1, density=True, histtype='step', color='tab:orange', lw=3, label='lw=3')\nax.hist(histogram3, bins=1, density=True, histtype='step', color='tab:green', linewidth=3, label='linewidth=3')\nax.legend()\n\nplt.show()\n\nprint(matplotlib.__version__)\n```\n\n### Actual outcome\n\n\n\n### Expected outcome\n\nUsing `lw` and `linewidth` produce same output.\n\n### Additional information\n\nThis was not a problem with an earlier version of Matplotlib (don't remember the version unfortunately, but definitely 3.x something).\n\n### Operating system\n\nUbuntu 24.04.2 LTS\n\n### Matplotlib Version\n\n3.10.0\n\n### Matplotlib Backend\n\nagg\n\n### Python version\n\n3.12.3\n\n### Jupyter version\n\n4.2.5\n\n### Installation\n\npip","author":{"url":"https://github.com/gullbrekken","@type":"Person","name":"gullbrekken"},"datePublished":"2025-04-28T09:58:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/29977/matplotlib/issues/29977"}
| 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:62814950-cfc0-4674-e9f4-7b59bac1a69d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B144:141904:1661556:1D5EB1D:6A51C06E |
| html-safe-nonce | aaea438e5960d13d943acd32cc626d766fa28291ad0feffb38c9cb1dcd23223d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTQ0OjE0MTkwNDoxNjYxNTU2OjFENUVCMUQ6NkE1MUMwNkUiLCJ2aXNpdG9yX2lkIjoiNTAxNzI4MTE3NTIwNDUxMTg1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dc13df7032309b6118d66cf263f7bdf3f6c93c1031bcae34d4afac624b9e1b32 |
| hovercard-subject-tag | issue:3024393674 |
| 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/29977/issue_layout |
| twitter:image | https://opengraph.githubassets.com/81e0577d5161fd00954e1a38195eed890c06b484e733c07f0e439ba9954e33b9/matplotlib/matplotlib/issues/29977 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/81e0577d5161fd00954e1a38195eed890c06b484e733c07f0e439ba9954e33b9/matplotlib/matplotlib/issues/29977 |
| og:image:alt | Bug summary ax.hist ignores lw argument. Must use linewidth in order to change the thickness of the lines. Code for reproduction # Test of lw vs linewidth in histograms histogram1 = [1] histogram2 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gullbrekken |
| 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