René's URL Explorer Experiment


Title: [Bug]: stacked histogram does not properly handle edgecolor and hatches · Issue #26718 · matplotlib/matplotlib · GitHub

Open Graph Title: [Bug]: stacked histogram does not properly handle edgecolor and hatches · Issue #26718 · matplotlib/matplotlib

X Title: [Bug]: stacked histogram does not properly handle edgecolor and hatches · Issue #26718 · matplotlib/matplotlib

Description: Bug summary When using stacked histogram in matplotlib 3.7.2 the functionality of hatch and edgecolor is broken. It simply gives an error if trying to define either a separate edgecolor or hatch value for the stacked parts of the histogr...

Open Graph Description: Bug summary When using stacked histogram in matplotlib 3.7.2 the functionality of hatch and edgecolor is broken. It simply gives an error if trying to define either a separate edgecolor or hatch va...

X Description: Bug summary When using stacked histogram in matplotlib 3.7.2 the functionality of hatch and edgecolor is broken. It simply gives an error if trying to define either a separate edgecolor or hatch va...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/26718

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: stacked histogram does not properly handle edgecolor and hatches","articleBody":"### Bug summary\r\n\r\nWhen using stacked histogram in matplotlib 3.7.2 the functionality of hatch and edgecolor is broken. It simply gives an error if trying to define either a separate edgecolor or hatch value for the stacked parts of the histogram.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\nplt.hist([np.random.uniform(size=100), np.random.uniform(size=50)],\r\n         stacked=True,\r\n         color=[\"C0\", \"C1\"],\r\n         edgecolor='black',\r\n         hatch=[\"/\", \".\"],\r\n         linewidth=1,\r\n         fill=True,\r\n         density=False, \r\n         )\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n\u003e Traceback (most recent call last):\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 3460, in run_code\r\n\u003e     exec(code_obj, self.user_global_ns, self.user_ns)\r\n\u003e   File \"\u003cipython-input-11-3f15e200502a\u003e\", line 1, in \u003cmodule\u003e\r\n\u003e     plt.hist([np.random.uniform(size=100), np.random.uniform(size=50)],\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/pyplot.py\", line 2645, in hist\r\n\u003e     return gca().hist(\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/__init__.py\", line 1446, in inner\r\n\u003e     return func(ax, *map(sanitize_sequence, args), **kwargs)\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/axes/_axes.py\", line 6944, in hist\r\n\u003e     p._internal_update(kwargs)\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/artist.py\", line 1223, in _internal_update\r\n\u003e     return self._update_props(\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/artist.py\", line 1199, in _update_props\r\n\u003e     ret.append(func(v))\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/patches.py\", line 525, in set_hatch\r\n\u003e     mhatch._validate_hatch_pattern(hatch)\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/hatch.py\", line 188, in _validate_hatch_pattern\r\n\u003e     invalids = ''.join(sorted(invalids))\r\n\u003e TypeError: sequence item 0: expected str instance, NoneType found\r\n\r\n\r\nWhile using different edgecolors for the stacked part with \r\n\r\n```\r\nplt.hist([np.random.uniform(size=100), np.random.uniform(size=50)],\r\n         stacked=True,\r\n         color=[\"C0\", \"C1\"],\r\n         edgecolor=[\"C2\", \"C3\"],\r\n         hatch=\"/\",\r\n         linewidth=1,\r\n         fill=True,\r\n         density=False, \r\n         )\r\n```\r\n\r\ndelivers the error\r\n\r\n\u003e Traceback (most recent call last):\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/IPython/core/interactiveshell.py\", line 3460, in run_code\r\n\u003e     exec(code_obj, self.user_global_ns, self.user_ns)\r\n\u003e   File \"\u003cipython-input-16-4bdbf23ac913\u003e\", line 1, in \u003cmodule\u003e\r\n\u003e     plt.hist([np.random.uniform(size=100), np.random.uniform(size=50)],\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/pyplot.py\", line 2645, in hist\r\n\u003e     return gca().hist(\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/__init__.py\", line 1446, in inner\r\n\u003e     return func(ax, *map(sanitize_sequence, args), **kwargs)\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/axes/_axes.py\", line 6944, in hist\r\n\u003e     p._internal_update(kwargs)\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/artist.py\", line 1223, in _internal_update\r\n\u003e     return self._update_props(\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/artist.py\", line 1199, in _update_props\r\n\u003e     ret.append(func(v))\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/patches.py\", line 341, in set_edgecolor\r\n\u003e     self._set_edgecolor(color)\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/patches.py\", line 327, in _set_edgecolor\r\n\u003e     self._edgecolor = colors.to_rgba(color, self._alpha)\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/colors.py\", line 299, in to_rgba\r\n\u003e     rgba = _to_rgba_no_colorcycle(c, alpha)\r\n\u003e   File \"/opt/anaconda3/envs/code/lib/python3.10/site-packages/matplotlib/colors.py\", line 383, in _to_rgba_no_colorcycle\r\n\u003e     raise ValueError(\"RGBA sequence should have length 3 or 4\")\r\n\u003e ValueError: RGBA sequence should have length 3 or 4\r\n\r\nIt seems to interpret the list of `edgecolor` [\"C2\", \"C3\"] as one color, although it is able to manage similar input for `color`.\r\n\r\n### Expected outcome\r\n\r\nIt should look similar to the following example, except that the top orange part should have dots and not slanted lines:\r\n![test_bugreport](https://github.com/matplotlib/matplotlib/assets/43748463/d29ca5f2-3f89-4c57-a608-edb4aba302ce)\r\nThe code used to generate this plot:\r\n\r\n```\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nplt.hist([np.random.uniform(size=100), np.random.uniform(size=50)],\r\n         stacked=True,\r\n         color=[\"C0\", \"C1\"],\r\n         edgecolor='black',\r\n         hatch=\"/\",\r\n         linewidth=1,\r\n         fill=True,\r\n         density=False, \r\n         )\r\n```\r\n\r\nIn case of the second example it should habe two different edgecolors for the first and second part of the stacked histogram.\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\nMacOSX\r\n\r\n### Matplotlib Version\r\n\r\n3.7.2\r\n\r\n### Matplotlib Backend\r\n\r\nMacOSX\r\n\r\n### Python version\r\n\r\n3.10.0\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\nconda","author":{"url":"https://github.com/marcelernst","@type":"Person","name":"marcelernst"},"datePublished":"2023-09-07T21:11:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/26718/matplotlib/issues/26718"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:68f8b8c3-00cd-3280-d109-a28010b04b83
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC9F4:228F1C:2C791F:3AD1C6:6A52EB9A
html-safe-nonce44bcf18fe14b3d48e8a974bc19034bf58eff783ab0e0b7d3774d4b9ee1fffe40
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUY0OjIyOEYxQzoyQzc5MUY6M0FEMUM2OjZBNTJFQjlBIiwidmlzaXRvcl9pZCI6IjkwODM4NTEyNTg2ODM2NDg5MjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac75b17d1889e7fccfb7007d865489f0758438aacbb5b2936e6ecedbd50c8a79e6
hovercard-subject-tagissue:1886568974
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/26718/issue_layout
twitter:imagehttps://opengraph.githubassets.com/87997ebd2d966f0f801bdd4712146721d6e37bd7e94a78e878d59c406b0cc74a/matplotlib/matplotlib/issues/26718
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/87997ebd2d966f0f801bdd4712146721d6e37bd7e94a78e878d59c406b0cc74a/matplotlib/matplotlib/issues/26718
og:image:altBug summary When using stacked histogram in matplotlib 3.7.2 the functionality of hatch and edgecolor is broken. It simply gives an error if trying to define either a separate edgecolor or hatch va...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemarcelernst
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/26718#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F26718
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F26718
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/26718
Reloadhttps://github.com/matplotlib/matplotlib/issues/26718
Reloadhttps://github.com/matplotlib/matplotlib/issues/26718
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/26718
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/26718
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 408 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
#28073https://github.com/matplotlib/matplotlib/pull/28073
[Bug]: stacked histogram does not properly handle edgecolor and hatcheshttps://github.com/matplotlib/matplotlib/issues/26718#top
#28073https://github.com/matplotlib/matplotlib/pull/28073
v3.10.0https://github.com/matplotlib/matplotlib/milestone/84
https://github.com/marcelernst
marcelernsthttps://github.com/marcelernst
on Sep 7, 2023https://github.com/matplotlib/matplotlib/issues/26718#issue-1886568974
https://private-user-images.githubusercontent.com/43748463/266440513-d29ca5f2-3f89-4c57-a608-edb4aba302ce.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM4MTk0NjIsIm5iZiI6MTc4MzgxOTE2MiwicGF0aCI6Ii80Mzc0ODQ2My8yNjY0NDA1MTMtZDI5Y2E1ZjItM2Y4OS00YzU3LWE2MDgtZWRiNGFiYTMwMmNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzEyVDAxMTkyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwODYyYzk5NzU0MzQ3OWIxNTNkNmJkZGU0YmFjMDQ1MGE1YzgzZGRmYmU0ZTJlYjI4OTEzMWM3ZjMxM2ViNzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.zqqIkoiz4iGvKXpRiubRqHDZUfkpQvHouD2SEJ1PxDY
v3.10.0https://github.com/matplotlib/matplotlib/milestone/84
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.