Title: LogNorm colorbar prints double tick labels after set_ticks() · Issue #13112 · matplotlib/matplotlib · GitHub
Open Graph Title: LogNorm colorbar prints double tick labels after set_ticks() · Issue #13112 · matplotlib/matplotlib
X Title: LogNorm colorbar prints double tick labels after set_ticks() · Issue #13112 · matplotlib/matplotlib
Description: Bug report Bug summary Some colorbar labels are printed twice when I use a colorbar with LogNorm and small ranges of numbers after setting the ticks manually with set_ticks(). See figure below: By setting the minor_thresholds to somethin...
Open Graph Description: Bug report Bug summary Some colorbar labels are printed twice when I use a colorbar with LogNorm and small ranges of numbers after setting the ticks manually with set_ticks(). See figure below: By ...
X Description: Bug report Bug summary Some colorbar labels are printed twice when I use a colorbar with LogNorm and small ranges of numbers after setting the ticks manually with set_ticks(). See figure below: By ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/13112
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"LogNorm colorbar prints double tick labels after set_ticks()","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nSome colorbar labels are printed twice when I use a colorbar with LogNorm and small ranges of numbers after setting the ticks manually with set_ticks().\r\n\r\nSee figure below: By setting the minor_thresholds to something low, the double ticklabel at 20000 disappears, so it could have something to do with the minor formatter in LogFormatterSciNotation?\r\n\r\nI think it could be related to other issues that have been posted: [#12488](https://github.com/matplotlib/matplotlib/issues/12488) [#12503](https://github.com/matplotlib/matplotlib/issues/12503)\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.colors as mcolors\r\nimport matplotlib.ticker as ticker\r\n\r\nfig, ax = plt.subplots()\r\npcm = ax.imshow([[10000, 25000]], norm=mcolors.LogNorm())\r\ncb = fig.colorbar(pcm)\r\n# cb.formatter.minor_thresholds = [0,0] # deactivates minor ticks labels?\r\ncb.formatter = ticker.EngFormatter()\r\ncb.set_ticks([10000,20000,25000])\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n\r\n\r\n**Expected outcome**\r\n\r\nThere should be no double ticks.\r\n\r\n**Matplotlib version**\r\n * Operating system: OSX\r\n * Matplotlib version: 3.0.2\r\n * Matplotlib backend: Qt5Agg\r\n * Python version: 3.7\r\n * Jupyter version (if applicable): -\r\n * Other libraries: -\r\nI installed matplotlib via conda through the default channel.\r\n","author":{"url":"https://github.com/poppie137","@type":"Person","name":"poppie137"},"datePublished":"2019-01-05T18:30:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/13112/matplotlib/issues/13112"}
| 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:e9e4462d-078f-c78f-0075-b03e07648736 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BADE:3C7D61:13C3CBA:1AC171A:6A5579D3 |
| html-safe-nonce | 0a9bc31b69f6a12e6bb2dc4963ca44e54653d78dbaa1c44ed3e3828275e224e8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQURFOjNDN0Q2MToxM0MzQ0JBOjFBQzE3MUE6NkE1NTc5RDMiLCJ2aXNpdG9yX2lkIjoiNzUwNzM5MTM2Mzg4NzIzMzQ5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 06c249f38f0b5f6863fb4322f0df066e4c7962e5f249d1320856690fe0c83a98 |
| hovercard-subject-tag | issue:396188828 |
| 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/13112/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7aed45bcacbba3b654cb1689205b9cc530b8cfea41433f7d5a6725badfabf6d8/matplotlib/matplotlib/issues/13112 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7aed45bcacbba3b654cb1689205b9cc530b8cfea41433f7d5a6725badfabf6d8/matplotlib/matplotlib/issues/13112 |
| og:image:alt | Bug report Bug summary Some colorbar labels are printed twice when I use a colorbar with LogNorm and small ranges of numbers after setting the ticks manually with set_ticks(). See figure below: By ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | poppie137 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| 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 | 617ea94e2807dc3052601c560530bb3f8259bc9a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width