Title: [ENH]: Make it so that linestyle works the same way as color when plotting several bars, lines, scatter points, etc. · Issue #23222 · matplotlib/matplotlib · GitHub
Open Graph Title: [ENH]: Make it so that linestyle works the same way as color when plotting several bars, lines, scatter points, etc. · Issue #23222 · matplotlib/matplotlib
X Title: [ENH]: Make it so that linestyle works the same way as color when plotting several bars, lines, scatter points, etc. · Issue #23222 · matplotlib/matplotlib
Description: Problem Hello! I am trying to plot a series of bars within a bar plot, and I want each bar to have its own color and linestyle. I intend to achieve this by using a list of colors, and a list of linestyles, and then simply plot the bars a...
Open Graph Description: Problem Hello! I am trying to plot a series of bars within a bar plot, and I want each bar to have its own color and linestyle. I intend to achieve this by using a list of colors, and a list of lin...
X Description: Problem Hello! I am trying to plot a series of bars within a bar plot, and I want each bar to have its own color and linestyle. I intend to achieve this by using a list of colors, and a list of lin...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23222
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: Make it so that linestyle works the same way as color when plotting several bars, lines, scatter points, etc.","articleBody":"### Problem\r\n\r\nHello!\r\n\r\nI am trying to plot a series of bars within a bar plot, and I want each bar to have its own color and linestyle. I intend to achieve this by using a list of colors, and a list of linestyles, and then simply plot the bars and set the color and linestyle to their respective lists. This works for color, but not for linestyle, since the linestyle function does not recognize a list as input.\r\n\r\nBelow I have two code snippets, and their respective outputs, which highlights the problem.\r\n\r\nFirst, without using linestyle:\r\n\u003cimg width=\"560\" alt=\"image\" src=\"https://user-images.githubusercontent.com/106192446/172563688-bb3d68cf-5aed-4a3a-9b56-b2c1bdfb172e.png\"\u003e\r\n\r\nThen, using linestyle:\r\n\u003cimg width=\"542\" alt=\"image\" src=\"https://user-images.githubusercontent.com/106192446/172563953-bf041d1a-fe28-4046-8653-479584bd6f33.png\"\u003e\r\n\r\nI have checked that all of the linestyles are compatible with the plt.bar function.\r\n\r\n### Proposed solution\r\n\r\n_No response_","author":{"url":"https://github.com/AndreasBugten","@type":"Person","name":"AndreasBugten"},"datePublished":"2022-06-08T08:02:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/23222/matplotlib/issues/23222"}
| 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:9fef50cf-3a99-adf0-f9b8-cc337ed8062a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B160:D9FFD:1923CA5:240361B:6A4F76D1 |
| html-safe-nonce | ff9583708046136e2cf998c911954fc738dbff327fda7caa58f3d591c8c115af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTYwOkQ5RkZEOjE5MjNDQTU6MjQwMzYxQjo2QTRGNzZEMSIsInZpc2l0b3JfaWQiOiIxOTczODExNTgzNDAzMzkwNjczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 66549d4676875d59e40d91472b5dcebffa2b711cdad292b9c62e0290a9dca89a |
| hovercard-subject-tag | issue:1264353908 |
| 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/23222/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a98f44835da6b44f8f880d903f132a5d59e16af997b9f3386f817e17294b2ce6/matplotlib/matplotlib/issues/23222 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a98f44835da6b44f8f880d903f132a5d59e16af997b9f3386f817e17294b2ce6/matplotlib/matplotlib/issues/23222 |
| og:image:alt | Problem Hello! I am trying to plot a series of bars within a bar plot, and I want each bar to have its own color and linestyle. I intend to achieve this by using a list of colors, and a list of lin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AndreasBugten |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| 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 | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width