Title: ScalarFormatter.set_powerlimits documentation seems inconsistent · Issue #15376 · matplotlib/matplotlib · GitHub
Open Graph Title: ScalarFormatter.set_powerlimits documentation seems inconsistent · Issue #15376 · matplotlib/matplotlib
X Title: ScalarFormatter.set_powerlimits documentation seems inconsistent · Issue #15376 · matplotlib/matplotlib
Description: Bug report Documentation says: set_powerlimits(self, lims)[source] Sets size thresholds for scientific notation. (min_exp, max_exp) A tuple containing the powers of 10 that determine the switchover threshold. Numbers below 10**min_exp an...
Open Graph Description: Bug report Documentation says: set_powerlimits(self, lims)[source] Sets size thresholds for scientific notation. (min_exp, max_exp) A tuple containing the powers of 10 that determine the switchover...
X Description: Bug report Documentation says: set_powerlimits(self, lims)[source] Sets size thresholds for scientific notation. (min_exp, max_exp) A tuple containing the powers of 10 that determine the switchover...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/15376
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ScalarFormatter.set_powerlimits documentation seems inconsistent","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\nDocumentation says:\r\n\u003e set_powerlimits(self, lims)[source]\r\n\u003e Sets size thresholds for scientific notation.\r\n\u003e (min_exp, max_exp)\r\n\u003e A tuple containing the powers of 10 that determine the switchover threshold. Numbers below 10\\*\\*min_exp and above 10\\*\\*max_exp will be displayed in scientific notation.\r\n\r\nHowever\r\n\r\n```\r\n sFormatter = matplotlib.ticker.ScalarFormatter(useOffset=False, useMathText=True)\r\n sFormatter.set_powerlimits((-2, 2))\r\n plt.plot([120,130,140],[0.03,0.05,0.08])\r\n plt.gca().xaxis.set_major_formatter(sFormatter)\r\n plt.gca().yaxis.set_major_formatter(sFormatter)\r\n```\r\n\r\ndoes use scientific notation on the y axis but not the x axis. The the correct description of the actual behaviour seems to be \r\n\r\n\u003e A tuple containing the powers of 10 that determine the switchover threshold. Numbers with absolute values below 10**(min_exp+1) and above 10**(max_exp+1) will be displayed in scientific notation.\r\n\r\nOr it is a bug (would make more sense if the original description were correct).","author":{"url":"https://github.com/cmbant","@type":"Person","name":"cmbant"},"datePublished":"2019-10-03T22:29:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/15376/matplotlib/issues/15376"}
| 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:406c6bf2-8a7b-4fcc-d2ee-172bd62d8e7f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A2B4:371C7C:26B5E44:380B90F:6A550596 |
| html-safe-nonce | 5e3ae849a047760291c17382194796f91bdc6f7aab253d906ae4a4c5d897dee7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkI0OjM3MUM3QzoyNkI1RTQ0OjM4MEI5MEY6NkE1NTA1OTYiLCJ2aXNpdG9yX2lkIjoiMjQ0MjIwODgwMjQ2NjIzNTc5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2e782b1872b813558a4abba468c82c8dfb16ac924fb762acb06a8f676397378b |
| hovercard-subject-tag | issue:502330228 |
| 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/15376/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1342d3182a8181ac20eaf3a8a57a6f67d04e1d0c985b627396c19bbcd0c97d85/matplotlib/matplotlib/issues/15376 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1342d3182a8181ac20eaf3a8a57a6f67d04e1d0c985b627396c19bbcd0c97d85/matplotlib/matplotlib/issues/15376 |
| og:image:alt | Bug report Documentation says: set_powerlimits(self, lims)[source] Sets size thresholds for scientific notation. (min_exp, max_exp) A tuple containing the powers of 10 that determine the switchover... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cmbant |
| hostname | github.com |
| expected-hostname | github.com |
| None | eae2aab99907699a22d2c8449aa683ca74454fca87211b98f7c7b722086b2839 |
| 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 | 6a35ab858be185cd86d12b93a43bccf34e8d8536 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width