Title: Bar and box plots use the 'default' matplotlib colormap, even if the style is changed · Issue #5851 · matplotlib/matplotlib · GitHub
Open Graph Title: Bar and box plots use the 'default' matplotlib colormap, even if the style is changed · Issue #5851 · matplotlib/matplotlib
X Title: Bar and box plots use the 'default' matplotlib colormap, even if the style is changed · Issue #5851 · matplotlib/matplotlib
Description: I originally thought this was an issue with pandas ( pandas-dev/pandas#12029 ), but I can reproduce it by using matplotlib alone. After changing the style to "fivethirtyeight" (with pyplot.style.use("fivethirtyeight") ) and changing the ...
Open Graph Description: I originally thought this was an issue with pandas ( pandas-dev/pandas#12029 ), but I can reproduce it by using matplotlib alone. After changing the style to "fivethirtyeight" (with pyplot.style.us...
X Description: I originally thought this was an issue with pandas ( pandas-dev/pandas#12029 ), but I can reproduce it by using matplotlib alone. After changing the style to "fivethirtyeight" (with pyplo...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/5851
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bar and box plots use the 'default' matplotlib colormap, even if the style is changed","articleBody":"I originally thought this was an issue with pandas ( https://github.com/pydata/pandas/issues/12029 ), but I can reproduce it by using matplotlib alone.\n\nAfter changing the style to \"fivethirtyeight\" (with pyplot.style.use(\"fivethirtyeight\") ) and changing the default colormap (via rcParams), both bar plots and boxplots still use the default colors:\n\n```\nplt.plot([0, 1, 2, 3], [5, 6, 7, 8])\nplt.plot([0, 1, 2, 3], [6, 3, 7, 12], alpha=0.5)\n```\n\n\n\n```\nplt.bar([0, 1, 2, 3], [5, 6, 7, 8])\nplt.bar([0, 1, 2, 3], [6, 3, 7, 12], alpha=0.5)\n```\n\n\n\n```\nplt.boxplot([6, 3, 7, 12, 20, 25, 33])\n```\n\n\n\nThe code I used to customize the plotting style can be found on the pandas issue (like I said, it's mostly just setting the style to fivethirtyeight then changing the color cycle)\n","author":{"url":"https://github.com/halflings","@type":"Person","name":"halflings"},"datePublished":"2016-01-14T13:36:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/5851/matplotlib/issues/5851"}
| 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:99a55054-95dc-2b69-9737-a4236a36104e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9BE6:2D9C09:1C65C24:26B9EC9:6A540170 |
| html-safe-nonce | 236083f925f4ae96a0544e4957235b2a49210f2656ee50e26bc18aca5d669b28 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QkU2OjJEOUMwOToxQzY1QzI0OjI2QjlFQzk6NkE1NDAxNzAiLCJ2aXNpdG9yX2lkIjoiMTgxOTI1ODI0MTgxOTA4MzEyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3243b8b7f4ae1e1364b0a07c4f2d4d14179beb0b73689ba80fa5c5a80e047a4b |
| hovercard-subject-tag | issue:126656074 |
| 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/5851/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bb25ef50ebeb48f3d4bb88afdc76dc926110ad80f2d63b2f6a61466f71fbd8a3/matplotlib/matplotlib/issues/5851 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bb25ef50ebeb48f3d4bb88afdc76dc926110ad80f2d63b2f6a61466f71fbd8a3/matplotlib/matplotlib/issues/5851 |
| og:image:alt | I originally thought this was an issue with pandas ( pandas-dev/pandas#12029 ), but I can reproduce it by using matplotlib alone. After changing the style to "fivethirtyeight" (with pyplot.style.us... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | halflings |
| 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