Title: Axes3d plot_surface not supporting masked arrays? · Issue #4941 · matplotlib/matplotlib · GitHub
Open Graph Title: Axes3d plot_surface not supporting masked arrays? · Issue #4941 · matplotlib/matplotlib
X Title: Axes3d plot_surface not supporting masked arrays? · Issue #4941 · matplotlib/matplotlib
Description: Consider this code: import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as colors from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.add_subplot(1, 1, 1, projection='3d')...
Open Graph Description: Consider this code: import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as colors from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = f...
X Description: Consider this code: import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as colors from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = f...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/4941
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Axes3d plot_surface not supporting masked arrays?","articleBody":"Consider this code:\n\n```\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as colors\nfrom matplotlib import cm\nfrom mpl_toolkits.mplot3d import Axes3D\n\nfig = plt.figure()\nax = fig.add_subplot(1, 1, 1, projection='3d')\n\nx, y = np.meshgrid(np.linspace(-1, 1), np.linspace(-1, 1))\nz = x**2 + y**2\n\nz[10:20, 10:20] = 0.0\n\nmasked_array = np.ma.masked_equal(z, 0.0)\npalette = cm.gray\npalette.set_over('g', 1.0)\npalette.set_under('b', 1.0)\npalette.set_bad('r', 1.0)\n\nax.plot_surface(x,y,masked_array,\n rstride=1,\n cstride=1,\n cmap=palette,\n vmin=-1,\n vmax=1,\n )\nplt.show()\n```\n\nThe area set to zero should be red, but it isn't. It works on a 2d axis using pcolormesh.\n","author":{"url":"https://github.com/maxnoe","@type":"Person","name":"maxnoe"},"datePublished":"2015-08-17T18:51:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/4941/matplotlib/issues/4941"}
| 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:56b6067b-3262-72fe-63d4-85c8a2a3d227 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E160:3A95C6:726709:A6EC14:6A5753E1 |
| html-safe-nonce | 97274251f543c1b0abfcd2d843d4139473f6559c0f43e1af3808f88f09f63343 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTYwOjNBOTVDNjo3MjY3MDk6QTZFQzE0OjZBNTc1M0UxIiwidmlzaXRvcl9pZCI6IjY0MjEzNDIzNjY5MzUyNDE2OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 781ec0d648fcf4538109d8f26d1496fb825a63f875f3ffbf528de278f43e2497 |
| hovercard-subject-tag | issue:101485861 |
| 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/4941/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6f8cc1145b53d2903902cd1670e8886653ddde178e22c2b9df965a1e8e30fff2/matplotlib/matplotlib/issues/4941 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6f8cc1145b53d2903902cd1670e8886653ddde178e22c2b9df965a1e8e30fff2/matplotlib/matplotlib/issues/4941 |
| og:image:alt | Consider this code: import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as colors from matplotlib import cm from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | maxnoe |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98 |
| 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 | 602250ea3b6dd8302a7220ef98adb828dbc807e4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width