Title: [Bug]: PatchCollection fails to keep hatch from Patch · Issue #22654 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: PatchCollection fails to keep hatch from Patch · Issue #22654 · matplotlib/matplotlib
X Title: [Bug]: PatchCollection fails to keep hatch from Patch · Issue #22654 · matplotlib/matplotlib
Description: Bug summary When using add_collection to add Patches, hatch attribute isn't able to kept, whereas add_patch is fine. Code for reproduction from matplotlib.patches import Rectangle import matplotlib.pyplot as plt from matplotlib.collectio...
Open Graph Description: Bug summary When using add_collection to add Patches, hatch attribute isn't able to kept, whereas add_patch is fine. Code for reproduction from matplotlib.patches import Rectangle import matplotlib...
X Description: Bug summary When using add_collection to add Patches, hatch attribute isn't able to kept, whereas add_patch is fine. Code for reproduction from matplotlib.patches import Rectangle import matplo...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/22654
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: PatchCollection fails to keep hatch from Patch","articleBody":"### Bug summary\n\nWhen using add_collection to add Patches, hatch attribute isn't able to kept, whereas add_patch is fine.\n\n### Code for reproduction\n\n```python\nfrom matplotlib.patches import Rectangle\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.collections import PatchCollection\r\nfig, ax = plt.subplots(figsize=(4,4))\r\npatches = [\r\n Rectangle((0, 0), 0.2, .2, facecolor=\"orange\", hatch=\"/\")\r\n]\r\ncollected_patches = PatchCollection(patches, match_original=True)\r\nax.add_collection(collected_patches)\r\nax.add_patch(Rectangle((0.8, 0.8), 0.2,0.2, facecolor=\"skyblue\", hatch=\"/\"))\n```\n\n\n### Actual outcome\n\n\r\n\n\n### Expected outcome\n\n\r\n\n\n### Additional information\n\n_No response_\n\n### Operating system\n\n_No response_\n\n### Matplotlib Version\n\n3.5.1\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n_No response_\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\n_No response_","author":{"url":"https://github.com/GYHHAHA","@type":"Person","name":"GYHHAHA"},"datePublished":"2022-03-16T06:03:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/22654/matplotlib/issues/22654"}
| 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:8964dbeb-388c-5278-a669-2b7c504fdafc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AD5A:2C9FC7:1031616:15835D3:6A5335A8 |
| html-safe-nonce | f8af9bae5bd83184863157adbdf760541472e90424f74a9491bf4d62700acd41 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDVBOjJDOUZDNzoxMDMxNjE2OjE1ODM1RDM6NkE1MzM1QTgiLCJ2aXNpdG9yX2lkIjoiOTAxMjk2NDk2NjY1MTg2ODU4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5cafe94b5d323a9fe3929fb4f41722840245814f2a1dcc2fadb619c72fc22e3f |
| hovercard-subject-tag | issue:1170582288 |
| 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/22654/issue_layout |
| twitter:image | https://opengraph.githubassets.com/287077bd6b56914698cc0e78c833e29c3c6ee846d516b93823b1a08d82050f10/matplotlib/matplotlib/issues/22654 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/287077bd6b56914698cc0e78c833e29c3c6ee846d516b93823b1a08d82050f10/matplotlib/matplotlib/issues/22654 |
| og:image:alt | Bug summary When using add_collection to add Patches, hatch attribute isn't able to kept, whereas add_patch is fine. Code for reproduction from matplotlib.patches import Rectangle import matplotlib... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GYHHAHA |
| 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