Title: Scatter plot color array length should raise Error · Issue #3079 · matplotlib/matplotlib · GitHub
Open Graph Title: Scatter plot color array length should raise Error · Issue #3079 · matplotlib/matplotlib
X Title: Scatter plot color array length should raise Error · Issue #3079 · matplotlib/matplotlib
Description: Not sure if this behavior is intentional, but if one makes a scatter plot and provides an array for c which is longer than the number of x, y values, instead of raising an error from the arrays being unevenly shaped, it filled in the col...
Open Graph Description: Not sure if this behavior is intentional, but if one makes a scatter plot and provides an array for c which is longer than the number of x, y values, instead of raising an error from the arrays bei...
X Description: Not sure if this behavior is intentional, but if one makes a scatter plot and provides an array for c which is longer than the number of x, y values, instead of raising an error from the arrays bei...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/3079
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Scatter plot color array length should raise Error","articleBody":"Not sure if this behavior is intentional, but if one makes a scatter plot and provides an array for **c** which is longer than the number of x, y values, instead of raising an error from the arrays being unevenly shaped, it filled in the colors in incorrectly. Here is an example with the correct colors (because 'colors' is the same length as x and y)\n\n```\nx = np.linspace(0,10)\ny = np.sin(x)\ncolors = x\nplt.scatter(x,y, c=colors, cmap=mpl.cm.RdBu, s=100)\n```\n\nHere is one where colors is twice the size of x and y:\n\n```\nx = np.linspace(0,10)\ny = np.sin(x)\ncolors = np.linspace(0,10, 100)\nplt.scatter(x,y, c=colors, cmap=mpl.cm.RdBu, s=100)\n```\n\nSeems like the intended behavior would be to have an error thrown, or am I mistaken.\n","author":{"url":"https://github.com/hughesadam87","@type":"Person","name":"hughesadam87"},"datePublished":"2014-05-20T22:02:30Z","url":"https://github.com/matplotlib/matplotlib/issues/3079"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:9533006a-6c0e-4483-fc87-286f986f43c1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4A2:3EEC3:9BCED8:D3C443:6B069322 |
| html-safe-nonce | 38d094fff1183e5878404c59da19820f324301295e79ba78989f7e3b04f7cd27 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEEyOjNFRUMzOjlCQ0VEODpEM0M0NDM6NkIwNjkzMjIiLCJ2aXNpdG9yX2lkIjoiNzE3NzYwMzgyMDQ5MzkwMjYyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0a9046bb6b8d481a4c3b3637d66254d713efca0e683faf93118c5c404d0de54f |
| hovercard-subject-tag | issue:33934330 |
| 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/3079/issue_layout |
| twitter:image | https://opengraph.githubassets.com/44e25bcad4fb2b0f64dedf7bb7118dca75bbbbfa729ab770e8e75010e29666eb/matplotlib/matplotlib/issues/3079 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/44e25bcad4fb2b0f64dedf7bb7118dca75bbbbfa729ab770e8e75010e29666eb/matplotlib/matplotlib/issues/3079 |
| og:image:alt | Not sure if this behavior is intentional, but if one makes a scatter plot and provides an array for c which is longer than the number of x, y values, instead of raising an error from the arrays bei... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hughesadam87 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a |
| 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 | 6d3909414814ff86ce7da4c51a0f4918a13fb41b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width