Title: Passing a transposed array to patch.set_offsets() · Issue #7785 · matplotlib/matplotlib · GitHub
Open Graph Title: Passing a transposed array to patch.set_offsets() · Issue #7785 · matplotlib/matplotlib
X Title: Passing a transposed array to patch.set_offsets() · Issue #7785 · matplotlib/matplotlib
Description: To help us understand and resolve your issue please check that you have provided the information that corresponds to the type of issue that you are submitting. You can feel free to delete the sections that do not apply to your issue. ###...
Open Graph Description: To help us understand and resolve your issue please check that you have provided the information that corresponds to the type of issue that you are submitting. You can feel free to delete the secti...
X Description: To help us understand and resolve your issue please check that you have provided the information that corresponds to the type of issue that you are submitting. You can feel free to delete the secti...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7785
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Passing a transposed array to patch.set_offsets()","articleBody":"To help us understand and resolve your issue please check that you have provided\r\nthe information that corresponds to the type of issue that you are submitting. You can feel free to delete the sections that do not apply to your issue.\r\n\r\n###Bug report\r\n\r\n**Bug summary**\r\nThe method patch.set_offsets() fails quietly if passed a transposed array compared to what it expects.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport scipy\r\nfrom matplotlib import pyplot as plt\r\n\r\nU = scipy.rand(2,10)\r\npatch = plt.scatter(U[0, :], U[1, :])\r\nU[0, :] = 0\r\npatch.set_offsets(U)\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\nA figure with 5 scattered points at the origin and 5 scattered in the box [0,1]x[0,1]\r\n\r\n**Expected outcome**\r\n\r\nI expect this to fail, the array U should be Nx2, rather than 2xN\r\n\r\n**Matplotlib version**\r\n\r\nPython 2.7.11 |Anaconda 2.4.1 (x86_64)| (default, Dec 6 2015, 18:57:58) (MacOSX)\r\nMatplotlib version: 1.5.1\r\n\r\n","author":{"url":"https://github.com/KeithWM","@type":"Person","name":"KeithWM"},"datePublished":"2017-01-10T14:38:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/7785/matplotlib/issues/7785"}
| 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:e894bd6d-b435-b602-24cb-96c981149280 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB54:356ACF:456126:65AD3E:6A55EBF9 |
| html-safe-nonce | 6da6e81b53ea9877ccfc41d0ebcae57e5a1409c7ef84dc5df36c4dc293da86a0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjU0OjM1NkFDRjo0NTYxMjY6NjVBRDNFOjZBNTVFQkY5IiwidmlzaXRvcl9pZCI6IjM2OTIxODExNTIyMDEzOTAwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 82765fb4a12bf29954bcc01405a09b1adc8b0d150a96b4f75829af078c09b9e9 |
| hovercard-subject-tag | issue:199838101 |
| 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/7785/issue_layout |
| twitter:image | https://opengraph.githubassets.com/60d5d030449951fb7a0a99aa8861af2dc75dd348c354b1811fec06e046d9de52/matplotlib/matplotlib/issues/7785 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/60d5d030449951fb7a0a99aa8861af2dc75dd348c354b1811fec06e046d9de52/matplotlib/matplotlib/issues/7785 |
| og:image:alt | To help us understand and resolve your issue please check that you have provided the information that corresponds to the type of issue that you are submitting. You can feel free to delete the secti... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KeithWM |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| 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 | 3725c7f9b2a6e3a27ef57c5aed13428c0f65e045 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width