Title: Setting xticklabels causes warning related to FixedFormatter · Issue #18848 · matplotlib/matplotlib · GitHub
Open Graph Title: Setting xticklabels causes warning related to FixedFormatter · Issue #18848 · matplotlib/matplotlib
X Title: Setting xticklabels causes warning related to FixedFormatter · Issue #18848 · matplotlib/matplotlib
Description: Bug report Bug summary I get a warning related to FixedFormatter even though I am not setting a formatter. Thanks to user Rational-IM on StackOverflow and the good folks at pandas for isolating and reproducing the bug. Code for reproduct...
Open Graph Description: Bug report Bug summary I get a warning related to FixedFormatter even though I am not setting a formatter. Thanks to user Rational-IM on StackOverflow and the good folks at pandas for isolating and...
X Description: Bug report Bug summary I get a warning related to FixedFormatter even though I am not setting a formatter. Thanks to user Rational-IM on StackOverflow and the good folks at pandas for isolating and...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18848
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Setting xticklabels causes warning related to FixedFormatter","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\nI get a warning related to `FixedFormatter` even though I am not setting a formatter.\r\n\r\nThanks to user Rational-IM [on StackOverflow](https://stackoverflow.com/questions/63723514/userwarning-fixedformatter-should-only-be-used-together-with-fixedlocator) and the good folks at [pandas ](https://github.com/pandas-dev/pandas/issues/35684) for isolating and reproducing the bug.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\n\r\nfig, ax = plt.subplots()\r\nax.scatter(0.5, 0.5)\r\nax.set_xticklabels(['0', r'$T/2$', r'$T$'])\r\n\r\n# Optional line\r\nax.xaxis.set_major_locator(FixedLocator([0, 0.5, 1]))\r\n\r\nNone\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\u003c!--The output produced by the above code, which may be a screenshot, console output, etc.--\u003e\r\n\r\n```\r\n\u003cipython-input-3-52a3699e4278\u003e:5: UserWarning: FixedFormatter should only be used together with FixedLocator\r\n ax.set_xticklabels(['0', r'$T/2$', r'$T$'])\r\n```\r\n\r\n**Expected outcome**\r\n\r\nWorks on 3.2.2 with no warning.\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: Win 10\r\n * Matplotlib version: 3.3.2\r\n * Matplotlib backend: module://ipykernel.pylab.backend_inline\r\n * Python version: 3.8.5\r\n * Jupyter version (if applicable): 6.1.4\r\n * Other libraries: none\r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\nInstalled from conda\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/igurin-invn","@type":"Person","name":"igurin-invn"},"datePublished":"2020-10-30T19:43:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":24},"url":"https://github.com/18848/matplotlib/issues/18848"}
| 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:c5115878-268f-b228-5486-eecef3ee484f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D98:3161F8:C09F59:1008F97:6A5409AF |
| html-safe-nonce | f1ed83bc819ca301159cf8e550403d0afe2286c54b5ab710d367f56fe87b534e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDk4OjMxNjFGODpDMDlGNTk6MTAwOEY5Nzo2QTU0MDlBRiIsInZpc2l0b3JfaWQiOiIzMDM3Mzc2NjQ5ODk5NTQyOTU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 10bcba599e815f9e5d8783ef7e296a03b76533a8c15ffe02704ea11f106b82ac |
| hovercard-subject-tag | issue:733469701 |
| 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/18848/issue_layout |
| twitter:image | https://opengraph.githubassets.com/70db597c642cfc5b87e784463ce1e857fd87617976bc25941d9ac335435562ac/matplotlib/matplotlib/issues/18848 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/70db597c642cfc5b87e784463ce1e857fd87617976bc25941d9ac335435562ac/matplotlib/matplotlib/issues/18848 |
| og:image:alt | Bug report Bug summary I get a warning related to FixedFormatter even though I am not setting a formatter. Thanks to user Rational-IM on StackOverflow and the good folks at pandas for isolating and... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | igurin-invn |
| 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