Title: Matplotlib hatch color broken · Issue #8076 · matplotlib/matplotlib · GitHub
Open Graph Title: Matplotlib hatch color broken · Issue #8076 · matplotlib/matplotlib
X Title: Matplotlib hatch color broken · Issue #8076 · matplotlib/matplotlib
Description: This may have some similarities with #7992, but seems not identical to other bug reports I found. Bug report Bug summary It is no longer possible to set the color of hatching in patches. This still worked in 1.5.3-. In particular, it aff...
Open Graph Description: This may have some similarities with #7992, but seems not identical to other bug reports I found. Bug report Bug summary It is no longer possible to set the color of hatching in patches. This still...
X Description: This may have some similarities with #7992, but seems not identical to other bug reports I found. Bug report Bug summary It is no longer possible to set the color of hatching in patches. This still...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8076
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Matplotlib hatch color broken","articleBody":"This may have some similarities with #7992, but seems not identical to other bug reports I found.\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\n- It is no longer possible to set the color of hatching in patches. This still worked in 1.5.3-.\r\n- In particular, it affects PathPatch for me, but seems a more general problem.\r\n\r\n**Code for reproduction**\r\n\r\nAn example modified from http://matplotlib.org/users/path_tutorial.html is\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.path import Path\r\nimport matplotlib.patches as patches\r\n\r\nverts = [\r\n (0., 0.), # left, bottom\r\n (0., 1.), # left, top\r\n (1., 1.), # right, top\r\n (1., 0.), # right, bottom\r\n (0., 0.), # ignored\r\n ]\r\n\r\ncodes = [Path.MOVETO,\r\n Path.LINETO,\r\n Path.LINETO,\r\n Path.LINETO,\r\n Path.CLOSEPOLY,\r\n ]\r\n\r\npath = Path(verts, codes)\r\n\r\nfig = plt.figure()\r\nax = fig.add_subplot(111)\r\npatch = patches.PathPatch(path, color='green', fill=False, hatch='xx', lw=2)\r\nax.add_patch(patch)\r\nax.set_xlim(-2,2)\r\nax.set_ylim(-2,2)\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\ngreen rectangle filled with **black** cross hatching on white background.\r\n\r\n**Expected outcome**\r\n\r\ngreen rectangle filled with (more dense) **green** cross hatching on white background.\r\n(Matplotlib 1.5.3-)\r\n\r\n**Matplotlib version**\r\n\r\nPython 3.6.0\r\nIPython 5.2.2\r\nMatplotlib 2.0.0\r\n\r\nYou should add a unit test for this.\r\n\r\n**Other examples**\r\n\r\n- An example of a similar problem can be found if you try to reproduce the plot at\r\nhttp://stackoverflow.com/questions/38168948/how-to-decouple-hatch-and-edge-color-in-matplotlib\r\nusing their code.\r\n\r\n","author":{"url":"https://github.com/2sn","@type":"Person","name":"2sn"},"datePublished":"2017-02-15T06:38:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/8076/matplotlib/issues/8076"}
| 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:199343ec-771e-cb4f-42fe-bc6e3ade8d65 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A076:1A7CA7:25E062E:32D95F7:6A53990A |
| html-safe-nonce | 552b9121b9cde67315d81338b9b1a09f30572ad046a95ef030fefe0b8642da79 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDc2OjFBN0NBNzoyNUUwNjJFOjMyRDk1Rjc6NkE1Mzk5MEEiLCJ2aXNpdG9yX2lkIjoiMjcwNzA0NjgzNjgwODY4NTgzNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c8c66b5c0bbcbde8f27392a7b1a309c5be9740baeabaf445932e2996815953b0 |
| hovercard-subject-tag | issue:207720665 |
| 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/8076/issue_layout |
| twitter:image | https://opengraph.githubassets.com/61ddb8147cd0b93e50ce156934a683ac6241f827d7527fb5c3d293cfdc3ced61/matplotlib/matplotlib/issues/8076 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/61ddb8147cd0b93e50ce156934a683ac6241f827d7527fb5c3d293cfdc3ced61/matplotlib/matplotlib/issues/8076 |
| og:image:alt | This may have some similarities with #7992, but seems not identical to other bug reports I found. Bug report Bug summary It is no longer possible to set the color of hatching in patches. This still... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 2sn |
| 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