Title: [Bug]: Stackplot does not pass `facecolor(s)` correctly to fill_between · Issue #30804 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Stackplot does not pass `facecolor(s)` correctly to fill_between · Issue #30804 · matplotlib/matplotlib
X Title: [Bug]: Stackplot does not pass `facecolor(s)` correctly to fill_between · Issue #30804 · matplotlib/matplotlib
Description: Bug summary I'm getting an error when specifying facecolor or facecolors for stackplot. Passing color or edgecolor does work however. Code for reproduction from matplotlib import pyplot as plt x = [0, 1, 2] y = [10, 20, 30] # Gives error...
Open Graph Description: Bug summary I'm getting an error when specifying facecolor or facecolors for stackplot. Passing color or edgecolor does work however. Code for reproduction from matplotlib import pyplot as plt x = ...
X Description: Bug summary I'm getting an error when specifying facecolor or facecolors for stackplot. Passing color or edgecolor does work however. Code for reproduction from matplotlib import pyplot as plt ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/30804
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Stackplot does not pass `facecolor(s)` correctly to fill_between","articleBody":"### Bug summary\n\nI'm getting an error when specifying `facecolor` or `facecolors` for stackplot. Passing `color` or `edgecolor` does work however.\n\n### Code for reproduction\n\n```Python\nfrom matplotlib import pyplot as plt\n\nx = [0, 1, 2]\ny = [10, 20, 30]\n\n# Gives error \"got multiple values for keyword argument 'facecolor'\"\nplt.stackplot(x, y, facecolor='red')\n\n# Gives error \"Got both 'facecolor' and 'facecolors'\"\nplt.stackplot(x, y, facecolors='red')\n```\n\n### Actual outcome\n\nWhen specifying `facecolor` for stackplot, I get the error: \"TypeError: matplotlib.axes._axes.Axes.fill_between() got multiple values for keyword argument 'facecolor'\".\n\nWhen specyfing `facecolors` for stackplot, I get the error: \"TypeError: Got both 'facecolor' and 'facecolors', which are aliases of one another\".\n\n### Expected outcome\n\nIt should pass the `facecolor(s)` to `fill_between`. How it does that exactly is open for interpretation: I would prefer if it would pass a list of colors as individual colors to subsequent `fill_between` calls (similar to how stackplot already interprets the `color` argument)\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nmacOS 15.7.2\n\n### Matplotlib Version\n\n3.9.4\n\n### Matplotlib Backend\n\nmacosx\n\n### Python version\n\n3.9.6\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/rbaardmanWKR","@type":"Person","name":"rbaardmanWKR"},"datePublished":"2025-12-01T20:59:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/30804/matplotlib/issues/30804"}
| 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:525d3317-7a37-c8ce-5adb-0a13a39ef8d2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F6C:1694AE:4630DE:5F1033:6A51C59B |
| html-safe-nonce | ec90f4d44d5715d113f869b12826c1ff34f7d29899ed1c231e78802a8c515d0e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjZDOjE2OTRBRTo0NjMwREU6NUYxMDMzOjZBNTFDNTlCIiwidmlzaXRvcl9pZCI6Ijc4ODU1ODk1MTUyMDQ2NzQ5NzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9a0da489743b4bdd53c707e9fdde00c6493977e968b8c20d53839cfe5d10b0e6 |
| hovercard-subject-tag | issue:3682830605 |
| 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/30804/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4ee1794beb3072945dab31df188be287442fff3775734851db9ec72a99442b57/matplotlib/matplotlib/issues/30804 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4ee1794beb3072945dab31df188be287442fff3775734851db9ec72a99442b57/matplotlib/matplotlib/issues/30804 |
| og:image:alt | Bug summary I'm getting an error when specifying facecolor or facecolors for stackplot. Passing color or edgecolor does work however. Code for reproduction from matplotlib import pyplot as plt x = ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rbaardmanWKR |
| 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