Title: eventplot: allow a list of alpha channels as in the case with colors · Issue #19376 · matplotlib/matplotlib · GitHub
Open Graph Title: eventplot: allow a list of alpha channels as in the case with colors · Issue #19376 · matplotlib/matplotlib
X Title: eventplot: allow a list of alpha channels as in the case with colors · Issue #19376 · matplotlib/matplotlib
Description: I'm not sure if it's a bug or a feature. It's both. >>> plt.eventplot([[0, 1, 2], [0.5, 2.3]], color=['r', 'g']) works while >>> plt.eventplot([[0, 1, 2], [0.5, 2.3]], alpha=[0.5, 0.2]) throws an error Traceback (most recent call last): ...
Open Graph Description: I'm not sure if it's a bug or a feature. It's both. >>> plt.eventplot([[0, 1, 2], [0.5, 2.3]], color=['r', 'g']) works while >>> plt.eventplot([[0, 1, 2], [0.5, 2.3]], alpha=[0.5, 0.2]) throws an e...
X Description: I'm not sure if it's a bug or a feature. It's both. >>> plt.eventplot([[0, 1, 2], [0.5, 2.3]], color=['r', 'g']) works while >>> plt.eventplot([[0, 1, ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/19376
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"eventplot: allow a list of alpha channels as in the case with colors","articleBody":"I'm not sure if it's a bug or a feature. It's both.\r\n\r\n```python\r\n\u003e\u003e\u003e plt.eventplot([[0, 1, 2], [0.5, 2.3]], color=['r', 'g'])\r\n```\r\nworks while\r\n```python\r\n\u003e\u003e\u003e plt.eventplot([[0, 1, 2], [0.5, 2.3]], alpha=[0.5, 0.2])\r\n```\r\nthrows an error\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/ulianych/anaconda3/envs/viziphant/lib/python3.7/site-packages/IPython/core/interactiveshell.py\", line 3319, in run_code\r\n exec(code_obj, self.user_global_ns, self.user_ns)\r\n File \"\u003cipython-input-2-fab7f3737c6e\u003e\", line 1, in \u003cmodule\u003e\r\n plt.eventplot([[0, 1, 2], [0.5, 2.3]], alpha=[0.5, 0.2])\r\n File \"/home/ulianych/anaconda3/envs/viziphant/lib/python3.7/site-packages/matplotlib/pyplot.py\", line 2622, in eventplot\r\n **({\"data\": data} if data is not None else {}), **kwargs)\r\n File \"/home/ulianych/anaconda3/envs/viziphant/lib/python3.7/site-packages/matplotlib/__init__.py\", line 1447, in inner\r\n return func(ax, *map(sanitize_sequence, args), **kwargs)\r\n File \"/home/ulianych/anaconda3/envs/viziphant/lib/python3.7/site-packages/matplotlib/axes/_axes.py\", line 1480, in eventplot\r\n coll.update(kwargs)\r\n File \"/home/ulianych/anaconda3/envs/viziphant/lib/python3.7/site-packages/matplotlib/artist.py\", line 998, in update\r\n ret.append(func(v))\r\n File \"/home/ulianych/anaconda3/envs/viziphant/lib/python3.7/site-packages/matplotlib/collections.py\", line 834, in set_alpha\r\n super().set_alpha(alpha)\r\n File \"/home/ulianych/anaconda3/envs/viziphant/lib/python3.7/site-packages/matplotlib/artist.py\", line 930, in set_alpha\r\n raise TypeError('alpha must be a float or None')\r\nTypeError: alpha must be a float or None\r\n```\r\n\r\nmatplotlib v3.3.3\r\nPython 3.7.6","author":{"url":"https://github.com/dizcza","@type":"Person","name":"dizcza"},"datePublished":"2021-01-27T13:51:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/19376/matplotlib/issues/19376"}
| 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:6670fe6e-2eef-948d-181f-5ba276d0c54e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B44C:234B42:22E23D6:2F9341E:6A5425D2 |
| html-safe-nonce | 7504f80457a7568de798cd4d64d4e128c887ab564d841dc5581d45f3cfbc612b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDRDOjIzNEI0MjoyMkUyM0Q2OjJGOTM0MUU6NkE1NDI1RDIiLCJ2aXNpdG9yX2lkIjoiMzA1ODM2MTk5MzI1MTc5MjMzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0ee5a7351b79f2e874478e22eb1cae644d04c7efcc604b9b34e9c83f6a5fcc6c |
| hovercard-subject-tag | issue:795119251 |
| 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/19376/issue_layout |
| twitter:image | https://opengraph.githubassets.com/997002ac7a40d94e1e460ab3d6ac669bedb6b78079b9a5bca8130d0bcb922ca9/matplotlib/matplotlib/issues/19376 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/997002ac7a40d94e1e460ab3d6ac669bedb6b78079b9a5bca8130d0bcb922ca9/matplotlib/matplotlib/issues/19376 |
| og:image:alt | I'm not sure if it's a bug or a feature. It's both. >>> plt.eventplot([[0, 1, 2], [0.5, 2.3]], color=['r', 'g']) works while >>> plt.eventplot([[0, 1, 2], [0.5, 2.3]], alpha=[0.5, 0.2]) throws an e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dizcza |
| 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