Title: Color bar has multiple labels for 0 if matplotlib.colors.SymLogNorm is used · Issue #10122 · matplotlib/matplotlib · GitHub
Open Graph Title: Color bar has multiple labels for 0 if matplotlib.colors.SymLogNorm is used · Issue #10122 · matplotlib/matplotlib
X Title: Color bar has multiple labels for 0 if matplotlib.colors.SymLogNorm is used · Issue #10122 · matplotlib/matplotlib
Description: Bug report Bug summary The color bar has multiple labels with the value 0 if matplotlib.colors.SymLogNorm is used leading to a "bold-looking" label. Code for reproduction from matplotlib import pyplot as plt import matplotlib as mpl fig,...
Open Graph Description: Bug report Bug summary The color bar has multiple labels with the value 0 if matplotlib.colors.SymLogNorm is used leading to a "bold-looking" label. Code for reproduction from matplotlib import pyp...
X Description: Bug report Bug summary The color bar has multiple labels with the value 0 if matplotlib.colors.SymLogNorm is used leading to a "bold-looking" label. Code for reproduction from matplotlib ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/10122
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Color bar has multiple labels for 0 if matplotlib.colors.SymLogNorm is used","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nThe color bar has multiple labels with the value 0 if `matplotlib.colors.SymLogNorm` is used leading to a \"bold-looking\" label.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nfrom matplotlib import pyplot as plt\r\nimport matplotlib as mpl\r\n\r\nfig, axes = plt.subplots(1, 2, True, True)\r\n\r\nfor i, ax in enumerate(axes): \r\n im = ax.imshow([[0]], norm=mpl.colors.SymLogNorm(1e-5, vmin=-1, vmax=1))\r\n cb = plt.colorbar(im, ax=ax)\r\n\r\n# Clean up the labels\r\nzero_labelled = False\r\nfor label in cb.ax.yaxis.get_ticklabels():\r\n if label.get_text() == r'$\\mathdefault{0}$':\r\n if zero_labelled:\r\n label.set_visible(False)\r\n zero_labelled = True\r\n```\r\n\r\n**Actual outcome on the left, expected outcome on the right**\r\n\r\n\r\n\r\n**Matplotlib version**\r\n\r\n * Operating system: Linux 1061836d2c20 4.9.49-moby #1 SMP Fri Dec 8 13:40:02 UTC 2017 x86_64 GNU/Linux\r\n * Matplotlib version: 2.1.1\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): module://ipykernel.pylab.backend_inline\r\n * Python version: 3.6.3\r\n * Jupyter version (if applicable): 4.4.0\r\n * Other libraries: numpy (1.13.3)\r\n\r\nAll libraries were installed using pip in a docker image derived from `python:3`.\r\n","author":{"url":"https://github.com/tillahoffmann","@type":"Person","name":"tillahoffmann"},"datePublished":"2017-12-28T11:38:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/10122/matplotlib/issues/10122"}
| 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:a89424fd-c46e-894e-d738-f078fd7f22b5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 90E6:1B00D1:13D15B9:1A2E7F1:6A51B9BC |
| html-safe-nonce | 9a1a47d21ab2f56d0c8e1ada7e962b1e5841799cb2b8cbb2eaf9bfdeaa4ddc8c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MEU2OjFCMDBEMToxM0QxNUI5OjFBMkU3RjE6NkE1MUI5QkMiLCJ2aXNpdG9yX2lkIjoiMTgwNDYyODI3MzI0MzczMjQxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1efe93a782e736a4252dcee64428bc342e5fc3848080370d6d264915ad7fb9f6 |
| hovercard-subject-tag | issue:284897674 |
| 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/10122/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de15d3ebb3ce295ea39ab9930f772ab89186c2d520471e5f1947f891c1fc0427/matplotlib/matplotlib/issues/10122 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de15d3ebb3ce295ea39ab9930f772ab89186c2d520471e5f1947f891c1fc0427/matplotlib/matplotlib/issues/10122 |
| og:image:alt | Bug report Bug summary The color bar has multiple labels with the value 0 if matplotlib.colors.SymLogNorm is used leading to a "bold-looking" label. Code for reproduction from matplotlib import pyp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tillahoffmann |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width