Title: Default color after setting alptha to Patch in legened · Issue #10574 · matplotlib/matplotlib · GitHub
Open Graph Title: Default color after setting alptha to Patch in legened · Issue #10574 · matplotlib/matplotlib
X Title: Default color after setting alptha to Patch in legened · Issue #10574 · matplotlib/matplotlib
Description: Bug report After setting alpha to legend Patch, the color of edited patch resets to default(blue). Code for reproduction """ ======== Barchart ======== A bar plot with errorbars and height labels on individual bars """ import matplotlib....
Open Graph Description: Bug report After setting alpha to legend Patch, the color of edited patch resets to default(blue). Code for reproduction """ ======== Barchart ======== A bar plot with errorbars and height labels o...
X Description: Bug report After setting alpha to legend Patch, the color of edited patch resets to default(blue). Code for reproduction """ ======== Barchart ======== A bar plot with errorbars and ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/10574
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Default color after setting alptha to Patch in legened","articleBody":"### Bug report\r\nAfter setting alpha to legend Patch, the color of edited patch resets to default(blue).\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\n\"\"\"\r\n========\r\nBarchart\r\n========\r\n\r\nA bar plot with errorbars and height labels on individual bars\r\n\"\"\"\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\nN = 5\r\nmen_means = (20, 35, 30, 35, 27)\r\nmen_std = (2, 3, 4, 1, 2)\r\n\r\nind = np.arange(N) # the x locations for the groups\r\nwidth = 0.35 # the width of the bars\r\n\r\nfig, ax = plt.subplots()\r\nrects1 = ax.bar(ind, men_means, width, color='r', yerr=men_std)\r\n\r\nwomen_means = (25, 32, 34, 20, 25)\r\nwomen_std = (3, 5, 2, 3, 3)\r\nrects2 = ax.bar(ind + width, women_means, width, color='y', yerr=women_std)\r\n\r\n# add some text for labels, title and axes ticks\r\nax.set_ylabel('Scores')\r\nax.set_title('Scores by group and gender')\r\nax.set_xticks(ind + width / 2)\r\nax.set_xticklabels(('G1', 'G2', 'G3', 'G4', 'G5'))\r\n\r\nleg = ax.legend((rects1[0], rects2[0]), ('Men', 'Women'))\r\n\r\n#this line causes bug - reset to default color(blue)\r\nleg.get_patches()[0].set_alpha(0.854321)\r\n\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\n**Expected outcome**\r\n\r\n\r\n\r\n**Matplotlib version**\r\n * Matplotlib version: 2.1.2\r\n * Python version: 2.7\r\n\r\n\r\n","author":{"url":"https://github.com/KonradAdamczyk","@type":"Person","name":"KonradAdamczyk"},"datePublished":"2018-02-23T20:24:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/10574/matplotlib/issues/10574"}
| 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:c70fa208-9943-d1b0-37c8-4eee580b505f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E42:25E8A1:CB7858:116C55A:6A53A829 |
| html-safe-nonce | 64b3e4bc04db31fb17085f7d3e4dd25f5601284b8c143c03737acc5836382e15 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTQyOjI1RThBMTpDQjc4NTg6MTE2QzU1QTo2QTUzQTgyOSIsInZpc2l0b3JfaWQiOiI3ODg3Nzc2NDM5NTM3NDc3NjczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3550cb4ece6b1f0682eec92eaddbc21ef86546f8514061de31523af9b8499bf4 |
| hovercard-subject-tag | issue:299839225 |
| 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/10574/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2a3b161b1798d6ab7cb1a3052798424ec507c8dae5b550efa082de5d1b3c60ee/matplotlib/matplotlib/issues/10574 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2a3b161b1798d6ab7cb1a3052798424ec507c8dae5b550efa082de5d1b3c60ee/matplotlib/matplotlib/issues/10574 |
| og:image:alt | Bug report After setting alpha to legend Patch, the color of edited patch resets to default(blue). Code for reproduction """ ======== Barchart ======== A bar plot with errorbars and height labels o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KonradAdamczyk |
| 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