Title: Colorbar with imshow(logNorm) shows unexpected minor ticks · Issue #8307 · matplotlib/matplotlib · GitHub
Open Graph Title: Colorbar with imshow(logNorm) shows unexpected minor ticks · Issue #8307 · matplotlib/matplotlib
X Title: Colorbar with imshow(logNorm) shows unexpected minor ticks · Issue #8307 · matplotlib/matplotlib
Description: Bug report Bug summary When using colorbar with imshow(image, norm=LogNorm()), the produced colorbar automatically adds minorticks, and cannot be turned off with cbar.ax.minorticks_off(). Also the font of the tick label is not the same a...
Open Graph Description: Bug report Bug summary When using colorbar with imshow(image, norm=LogNorm()), the produced colorbar automatically adds minorticks, and cannot be turned off with cbar.ax.minorticks_off(). Also the ...
X Description: Bug report Bug summary When using colorbar with imshow(image, norm=LogNorm()), the produced colorbar automatically adds minorticks, and cannot be turned off with cbar.ax.minorticks_off(). Also the ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8307
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Colorbar with imshow(logNorm) shows unexpected minor ticks","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nWhen using colorbar with imshow(image, norm=LogNorm()), the produced colorbar automatically adds minorticks, and cannot be turned off with cbar.ax.minorticks_off(). Also the font of the tick label is not the same as the font set in matplotlibrc. \r\n\r\n**Code for reproduction**\r\n\r\n```python\r\n# This is modified from an example in matplotlib gallery.\r\n\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nfrom numpy import ma\r\nfrom matplotlib import colors, ticker, cm\r\nfrom matplotlib.mlab import bivariate_normal\r\n\r\nN = 100\r\nx = np.linspace(-3.0, 3.0, N)\r\ny = np.linspace(-2.0, 2.0, N)\r\n\r\nX, Y = np.meshgrid(x, y)\r\n\r\nz = (bivariate_normal(X, Y, 0.1, 0.2, 1.0, 1.0)\r\n + 0.1 * bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0))\r\n\r\nz = ma.masked_where(z \u003c= 0, z)\r\n\r\nfig, ax = plt.subplots()\r\n\r\nfrom matplotlib.colors import LogNorm\r\n\r\ncs = ax.imshow(z,norm=LogNorm())\r\n\r\ncbar = fig.colorbar(cs)\r\n\r\ncbar.ax.minorticks_off()\r\n\r\nplt.show()\r\n\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n\r\n**Expected outcome**\r\n\r\nI would expect the colorbar to not have minorticks and to use the same font as other tick labels (I set font to be Arial in matplotlibrc). \r\n\r\n**Matplotlib version**\r\n\r\n- Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)\r\n\r\n2.0.0_1, OSX\r\n\r\n- How did you install Matplotlib and Python (pip, anaconda, from source ...)\r\nMacports\r\n\r\n**Edit by @afvincent:** removed the unnecessary instructions coming from the _bug report_ template.","author":{"url":"https://github.com/billtau","@type":"Person","name":"billtau"},"datePublished":"2017-03-16T13:04:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/8307/matplotlib/issues/8307"}
| 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:4aaefc40-f016-ad14-929b-2a33eca943bd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E4F4:18C7E2:13F38D5:1AB878C:6A5342E1 |
| html-safe-nonce | 63eeeaaf97feecc1130fc752f2f9ae1369364816c758003800567bab92aa8e0f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNEY0OjE4QzdFMjoxM0YzOEQ1OjFBQjg3OEM6NkE1MzQyRTEiLCJ2aXNpdG9yX2lkIjoiMjQ4NzM3ODE0NDU4OTQ2NDI4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 48dfe23eb91831533202ae121799a202123b812913ff92ee2d749e52e97f145d |
| hovercard-subject-tag | issue:214697415 |
| 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/8307/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0a7ad536cc4329ac6c1eae28838cc50510553207dcc9b48ac6de08474c28fe8e/matplotlib/matplotlib/issues/8307 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0a7ad536cc4329ac6c1eae28838cc50510553207dcc9b48ac6de08474c28fe8e/matplotlib/matplotlib/issues/8307 |
| og:image:alt | Bug report Bug summary When using colorbar with imshow(image, norm=LogNorm()), the produced colorbar automatically adds minorticks, and cannot be turned off with cbar.ax.minorticks_off(). Also the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | billtau |
| 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