Title: Issue · GitHub
Open Graph Title: Issue · matplotlib/matplotlib
X Title: Issue · matplotlib/matplotlib
Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.
Open Graph Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.
X Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.
Opengraph URL: https://github.com/matplotlib/matplotlib
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Axis multiplier when using plot_surface appears outside of the figure window","articleBody":"### Bug summary\n\nI am using plot_surface but ran into the issue that when scientific notation is needed, the axis multiplier is offset to the point that it no longer appears in the figure window. I am using matplotlib version 3.7.1 in python 3.11.\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\n\r\nax = plt.figure().add_subplot(projection='3d')\r\n\r\nX, Y = np.mgrid[0:6*np.pi:0.25, 0:4*np.pi:0.25]\r\nZ = np.sqrt(np.abs(np.cos(X) + np.cos(Y)))\r\n\r\nax.plot_surface(X * 1e5, Y * 1e5, Z, cmap='autumn',cstride=2, rstride=2)\r\n\r\nax.set_xlabel(\"X label\")\r\nax.set_ylabel(\"Y label\")\r\nax.set_zlabel(\"Z label\")\r\nax.set_zlim(0, 2)\r\n\r\nplt.show()\n```\n\n\n### Actual outcome\n\n\r\n\n\n### Expected outcome\n\nThe x and y axis are missing the 1e6 multiplier. In fact the multiplier is generated but it is actually plotted outside of the limits of the figure window. They can be made to appear by rotating the figure. I am attaching the rotated image showing the two 1e6 multipliers that are plotted far from where they should appear.\r\n\r\n\n\n### Additional information\n\nI am new to python and, while proficient in other programing/scripting languages, I do not feel qualified to look at matplotlib code to figure out where the issue is. I reported this issue in StackOverflow but did not received a possible solution. Probably because I did not do a good job of explaining the issue.\n\n### Operating system\n\nMAC OS Ventura 13.4\n\n### Matplotlib Version\n\n3.7.1\n\n### Matplotlib Backend\n\nMacOSX\n\n### Python version\n\n3.11.3\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nconda","author":{"url":"https://github.com/CarrascoCesar","@type":"Person","name":"CarrascoCesar"},"datePublished":"2023-06-09T18:15:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/26100/matplotlib/issues/26100"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:dedcbe12-4516-fc86-d621-8df22ad68974 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9334:228F1C:251FB62:32D2760:6A53A5AF |
| html-safe-nonce | 783d92af84e62f006cd6e0ebd12605c76d271dbc46b5e05882d9ae335f583a67 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzM0OjIyOEYxQzoyNTFGQjYyOjMyRDI3NjA6NkE1M0E1QUYiLCJ2aXNpdG9yX2lkIjoiMTg4NDIzNzU3MDgzOTM4OTYxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dfe74c37e65f27855f488952ec51f5485e2b0a63e7e632cec9df807e5b8b1c60 |
| hovercard-subject-tag | repository:1385122 |
| 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/matplotlib/matplotlib/issues/26100 |
| twitter:image | https://opengraph.githubassets.com/da3717e6a83f542c01acc8b29c6ba51dfbca02ffc2e01ed498a541326027c167/matplotlib/matplotlib |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/da3717e6a83f542c01acc8b29c6ba51dfbca02ffc2e01ed498a541326027c167/matplotlib/matplotlib |
| og:image:alt | matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-cache |
| 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