Title: scatter - set_facecolors is not working on Axes3D · Issue #9725 · matplotlib/matplotlib · GitHub
Open Graph Title: scatter - set_facecolors is not working on Axes3D · Issue #9725 · matplotlib/matplotlib
X Title: scatter - set_facecolors is not working on Axes3D · Issue #9725 · matplotlib/matplotlib
Description: Bug report Bug summary Trying to replicate this code: https://matplotlib.org/examples/animation/rain.html , but in Axes3D does not work, it seems that it is not possible to change the facecolors of the scatter while axes is 3D (it does w...
Open Graph Description: Bug report Bug summary Trying to replicate this code: https://matplotlib.org/examples/animation/rain.html , but in Axes3D does not work, it seems that it is not possible to change the facecolors of...
X Description: Bug report Bug summary Trying to replicate this code: https://matplotlib.org/examples/animation/rain.html , but in Axes3D does not work, it seems that it is not possible to change the facecolors of...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/9725
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"scatter - set_facecolors is not working on Axes3D","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nTrying to replicate this code: https://matplotlib.org/examples/animation/rain.html , but in Axes3D does not work, it seems that it is not possible to change the facecolors of the scatter while axes is 3D (it does work in 2d)\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required--\u003e\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib\r\nimport matplotlib.cm as cmx\r\nfrom mpl_toolkits.mplot3d import Axes3D\r\nplt.figure()\r\njet = cm = plt.get_cmap('jet')\r\ncNorm = matplotlib.colors.Normalize(vmin=1, vmax=10)\r\nscalarMap = cmx.ScalarMappable(norm=cNorm, cmap=jet)\r\n\r\ncells = 10\r\nax = plt.subplot(1,1,1, projection='3d')\r\npos = np.random.uniform(0, 1, (10, 3))\r\n\r\nscat = ax.scatter(pos[:,0],pos[:,1],pos[:,2],\r\n edgecolors=None,\r\n facecolors= [scalarMap.to_rgba(1) for cond in range(10)])\r\n\r\nscat.set_facecolors([scalarMap.to_rgba(10) for cond in range(10)])\r\nplt.show()\r\n##the dots should be red, but they are blue\r\n\r\n```\r\n\r\n\r\n\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: MacOs\r\n * Matplotlib version: 2.1.0\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): MacOSX\r\n * Python version: 2.7.14\r\n * Jupyter version (if applicable):\r\n * Other libraries: \r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\n","author":{"url":"https://github.com/orena1","@type":"Person","name":"orena1"},"datePublished":"2017-11-09T06:46:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/9725/matplotlib/issues/9725"}
| 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:a1233e34-5fd4-a77d-4f00-0ee4c3e66be4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1B0:15F1A6:2AC8B91:399E1B8:6A53A783 |
| html-safe-nonce | a6a23a9109aba28a32404f0dfdd9f3a60461433a1386997d7e811458d314f8a4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUIwOjE1RjFBNjoyQUM4QjkxOjM5OUUxQjg6NkE1M0E3ODMiLCJ2aXNpdG9yX2lkIjoiODgxODMyOTUwNDIwMjMzNjEzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 06f87a835dea189c91dd0d94edb39724fd00b3199614346e74ae2079b8d6ad0d |
| hovercard-subject-tag | issue:272456964 |
| 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/9725/issue_layout |
| twitter:image | https://opengraph.githubassets.com/abf1620590b3d58db8c99be350d32bbed33cf46436d4c6ed878366b2f6cd0ec2/matplotlib/matplotlib/issues/9725 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/abf1620590b3d58db8c99be350d32bbed33cf46436d4c6ed878366b2f6cd0ec2/matplotlib/matplotlib/issues/9725 |
| og:image:alt | Bug report Bug summary Trying to replicate this code: https://matplotlib.org/examples/animation/rain.html , but in Axes3D does not work, it seems that it is not possible to change the facecolors of... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | orena1 |
| 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