Title: wrong hatch color in legend · Issue #8463 · matplotlib/matplotlib · GitHub
Open Graph Title: wrong hatch color in legend · Issue #8463 · matplotlib/matplotlib
X Title: wrong hatch color in legend · Issue #8463 · matplotlib/matplotlib
Description: Follow-up of #8076. Bug report Bug summary the hatch color in the legend doesn't match the color in the figure Code for reproduction A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies require...
Open Graph Description: Follow-up of #8076. Bug report Bug summary the hatch color in the legend doesn't match the color in the figure Code for reproduction A minimum code snippet required to reproduce the bug, also minim...
X Description: Follow-up of #8076. Bug report Bug summary the hatch color in the legend doesn't match the color in the figure Code for reproduction A minimum code snippet required to reproduce the bug, also m...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8463
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"wrong hatch color in legend","articleBody":"Follow-up of #8076.\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\n- the hatch color in the legend doesn't match the color in the figure\r\n\r\n**Code for reproduction**\r\n\r\n- A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required\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, label='foo')\r\nax.add_patch(patch)\r\nax.set_xlim(-.5,1.5)\r\nax.set_ylim(-.5,1.5)\r\nax.legend(handlelength=10, handleheight=10)\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\n- The legend uses a black hatch color\r\n\r\n**Expected outcome**\r\n\r\n- The hatch color in the legend matches the hatch color in the figure.\r\n\r\n**Matplotlib version**\r\nCurrent v2.0.x branch (matplotlib-2.0.0+160.ge9ab1cf)\r\n\r\n- Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)\r\nPython 2.7, Ubuntu 16.04\r\n- How did you install Matplotlib and Python (pip, anaconda, from source ...)\r\n``pip install git+https://github.com/matplotlib/matplotlib.git@v2.0.x#matplotlib``\r\n","author":{"url":"https://github.com/bastibl","@type":"Person","name":"bastibl"},"datePublished":"2017-04-11T10:04:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/8463/matplotlib/issues/8463"}
| 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:f0aab477-5a7a-5ab9-f4c0-5b36311ce0de |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4F2:28B0A3:C835A3:10C93BA:6A52A2D9 |
| html-safe-nonce | 9b1cfa7cc2a2de87e2623c4180ff5d8467b9f7154aa4e95e172a7ad10f52afd2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEYyOjI4QjBBMzpDODM1QTM6MTBDOTNCQTo2QTUyQTJEOSIsInZpc2l0b3JfaWQiOiI0MTUyMjY4NjExMzk3MDAxOTQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 51388898c9e4558329f471529a99b549c881ffd3bc5c51d0711935dc5c88e185 |
| hovercard-subject-tag | issue:220900893 |
| 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/8463/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e6234e1ddec067c1d80db190ec4ea12fdd50a1eaabcec4fdec9d06605f508445/matplotlib/matplotlib/issues/8463 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e6234e1ddec067c1d80db190ec4ea12fdd50a1eaabcec4fdec9d06605f508445/matplotlib/matplotlib/issues/8463 |
| og:image:alt | Follow-up of #8076. Bug report Bug summary the hatch color in the legend doesn't match the color in the figure Code for reproduction A minimum code snippet required to reproduce the bug, also minim... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bastibl |
| 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