Title: Multicolor errorbars cannot have caps · Issue #14480 · matplotlib/matplotlib · GitHub
Open Graph Title: Multicolor errorbars cannot have caps · Issue #14480 · matplotlib/matplotlib
X Title: Multicolor errorbars cannot have caps · Issue #14480 · matplotlib/matplotlib
Description: Bug report Bug summary Bringing https://stackoverflow.com/questions/56490293/why-do-i-get-an-invalid-rgba-argument-valueerror-when-defining-capsize-to-my-e to the issue tracker. Multicolored errorbars cannot have caps. Settings capsize f...
Open Graph Description: Bug report Bug summary Bringing https://stackoverflow.com/questions/56490293/why-do-i-get-an-invalid-rgba-argument-valueerror-when-defining-capsize-to-my-e to the issue tracker. Multicolored errorb...
X Description: Bug report Bug summary Bringing https://stackoverflow.com/questions/56490293/why-do-i-get-an-invalid-rgba-argument-valueerror-when-defining-capsize-to-my-e to the issue tracker. Multicolored errorb...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/14480
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Multicolor errorbars cannot have caps","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nBringing https://stackoverflow.com/questions/56490293/why-do-i-get-an-invalid-rgba-argument-valueerror-when-defining-capsize-to-my-e to the issue tracker.\r\n\r\nMulticolored errorbars cannot have caps. Settings `capsize` for a bar plot with multiple colors results in a ValueError.\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.--\u003e\r\n\r\n```\r\nimport matplotlib.pyplot as plt\r\nplt.rcParams[\"errorbar.capsize\"] = 2\r\n\r\nfig, ax = plt.subplots( figsize=(3,3))\r\n\r\ncolors=['crimson', 'limegreen', 'indigo']\r\n\r\nax.bar( [0,1,2], \r\n [5,3,4],\r\n linewidth=2,\r\n color=\"papayawhip\",\r\n edgecolor=colors,\r\n ecolor=colors,\r\n yerr=[1.5, 1, 1.5], \r\n error_kw = {\r\n 'elinewidth': 2, }\r\n )\r\n\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\u003c!--The output produced by the above code, which may be a screenshot, console output, etc.--\u003e\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\backends\\backend_qt5.py\", line 501, in _draw_idle\r\n self.draw()\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\backends\\backend_agg.py\", line 388, in draw\r\n self.figure.draw(self.renderer)\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\artist.py\", line 38, in draw_wrapper\r\n return draw(artist, renderer, *args, **kwargs)\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\figure.py\", line 1709, in draw\r\n renderer, self, artists, self.suppressComposite)\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\image.py\", line 135, in _draw_list_compositing_images\r\n a.draw(renderer)\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\artist.py\", line 38, in draw_wrapper\r\n return draw(artist, renderer, *args, **kwargs)\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\axes\\_base.py\", line 2645, in draw\r\n mimage._draw_list_compositing_images(renderer, self, artists)\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\image.py\", line 135, in _draw_list_compositing_images\r\n a.draw(renderer)\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\artist.py\", line 38, in draw_wrapper\r\n return draw(artist, renderer, *args, **kwargs)\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\lines.py\", line 812, in draw\r\n self.get_markeredgecolor(), self._alpha)\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\colors.py\", line 177, in to_rgba\r\n rgba = _to_rgba_no_colorcycle(c, alpha)\r\n File \"D:\\***\\lib\\site-packages\\matplotlib\\colors.py\", line 238, in _to_rgba_no_colorcycle\r\n raise ValueError(\"Invalid RGBA argument: {!r}\".format(orig_c))\r\nValueError: Invalid RGBA argument: ['crimson', 'limegreen', 'indigo']\r\n```\r\n\r\n**Expected outcome**\r\n\r\nExpected outcome would be the same as with\r\n\r\n plt.rcParams[\"errorbar.capsize\"] = 0\r\n\r\n\r\n\r\n\r\n***but with caps on the errorbars:***\r\n\r\n\r\n\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: Win8\r\n * Matplotlib version: current\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): any\r\n * Python version: 3.6.6\r\n","author":{"url":"https://github.com/ImportanceOfBeingErnest","@type":"Person","name":"ImportanceOfBeingErnest"},"datePublished":"2019-06-07T09:05:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/14480/matplotlib/issues/14480"}
| 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:bb30ac0d-6435-463e-e544-585c67436d21 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9C78:378B6C:100EFD5:15D18AF:6A5209AB |
| html-safe-nonce | 02dcde9230d6b1da02f10305cb5cdf1b19bb1e49f185cec554f848982a85fd2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Qzc4OjM3OEI2QzoxMDBFRkQ1OjE1RDE4QUY6NkE1MjA5QUIiLCJ2aXNpdG9yX2lkIjoiNzc3NTIyOTEwNjQ2ODI5MzAzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1b64facb52f6fb3441b04fae5d096f440db0f7c752e8c4381b6029cf68d60710 |
| hovercard-subject-tag | issue:453411132 |
| 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/14480/issue_layout |
| twitter:image | https://opengraph.githubassets.com/49c07c338ee86e95a42eeb91813758714b7510bf4d5d5ed1e33b74f085c33e54/matplotlib/matplotlib/issues/14480 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/49c07c338ee86e95a42eeb91813758714b7510bf4d5d5ed1e33b74f085c33e54/matplotlib/matplotlib/issues/14480 |
| og:image:alt | Bug report Bug summary Bringing https://stackoverflow.com/questions/56490293/why-do-i-get-an-invalid-rgba-argument-valueerror-when-defining-capsize-to-my-e to the issue tracker. Multicolored errorb... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ImportanceOfBeingErnest |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width