Title: [Bug]: surface_plot cannot generate image even the axis · Issue #24725 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: surface_plot cannot generate image even the axis · Issue #24725 · matplotlib/matplotlib
X Title: [Bug]: surface_plot cannot generate image even the axis · Issue #24725 · matplotlib/matplotlib
Description: Bug summary When I used surface_plot function with matplotlib version 3.6.2 on MacOS to draw a 3D image, nothing appears even the axis. When I tried to degrade matplotlib to 3.5 and run the same code, it works. Code for reproduction impo...
Open Graph Description: Bug summary When I used surface_plot function with matplotlib version 3.6.2 on MacOS to draw a 3D image, nothing appears even the axis. When I tried to degrade matplotlib to 3.5 and run the same co...
X Description: Bug summary When I used surface_plot function with matplotlib version 3.6.2 on MacOS to draw a 3D image, nothing appears even the axis. When I tried to degrade matplotlib to 3.5 and run the same co...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/24725
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: surface_plot cannot generate image even the axis","articleBody":"### Bug summary\n\nWhen I used surface_plot function with matplotlib version 3.6.2 on MacOS to draw a 3D image, nothing appears even the axis.\r\nWhen I tried to degrade matplotlib to 3.5 and run the same code, it works.\n\n### Code for reproduction\n\n```python\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom mpl_toolkits.mplot3d import Axes3D\r\nfrom scipy.stats import multivariate_normal\r\ndef Gaussian_Distribution(N=2, M=1000, m=0, sigma=1):\r\n mean = np.zeros(N) + m\r\n cov = np.eye(N) * sigma\r\n\r\n data = np.random.multivariate_normal(mean, cov, M)\r\n Gaussian = multivariate_normal(mean=mean, cov=cov)\r\n \r\n return data, Gaussian\r\n\r\nM = 100\r\ndata, Gaussian = Gaussian_Distribution(N=2, M=M, sigma=0.1)\r\nX, Y = np.meshgrid(np.linspace(-1,1,M), np.linspace(-1,1,M))\r\nd = np.dstack([X,Y])\r\nZ = Gaussian.pdf(d).reshape(M,M)\r\n\r\n\r\nfig = plt.figure(figsize=(6,4))\r\nax = Axes3D(fig)\r\nax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap='seismic', alpha=0.8)\r\n\r\nax.set_xlabel('X')\r\nax.set_ylabel('Y')\r\nax.set_zlabel('Z')\r\nplt.savefig('123.png')\r\nplt.show()\n```\n\n\n### Actual outcome\n\n\r\n\n\n### Expected outcome\n\n\r\n\n\n### Additional information\n\n_No response_\n\n### Operating system\n\n_No response_\n\n### Matplotlib Version\n\n3.6.2\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n_No response_\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nNone","author":{"url":"https://github.com/VaneYb","@type":"Person","name":"VaneYb"},"datePublished":"2022-12-14T11:05:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/24725/matplotlib/issues/24725"}
| 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:d16f29a3-2af3-08e8-2497-77b7d8e1fd08 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF16:153295:1C678D7:2740655:6A50A2D4 |
| html-safe-nonce | 4e41df5d67a5a222231a8759752173ab54294653b4516169db4fc0a4f06f5265 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjE2OjE1MzI5NToxQzY3OEQ3OjI3NDA2NTU6NkE1MEEyRDQiLCJ2aXNpdG9yX2lkIjoiMTIyMTc1MTk1NjQ5MTUxMDQ4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1982ece5c8cb73b8ba7abe34678cd02cc183396ce2cee4048accfa781b3646ee |
| hovercard-subject-tag | issue:1496361817 |
| 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/24725/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b3916a083a43c8a19fd10566b24ea305beade0d14ec68b7a530c0e466092554f/matplotlib/matplotlib/issues/24725 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b3916a083a43c8a19fd10566b24ea305beade0d14ec68b7a530c0e466092554f/matplotlib/matplotlib/issues/24725 |
| og:image:alt | Bug summary When I used surface_plot function with matplotlib version 3.6.2 on MacOS to draw a 3D image, nothing appears even the axis. When I tried to degrade matplotlib to 3.5 and run the same co... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | VaneYb |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| 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 | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width