Title: Feature request: auto locate minor ticks on log scaled color bar · Issue #7141 · matplotlib/matplotlib · GitHub
Open Graph Title: Feature request: auto locate minor ticks on log scaled color bar · Issue #7141 · matplotlib/matplotlib
X Title: Feature request: auto locate minor ticks on log scaled color bar · Issue #7141 · matplotlib/matplotlib
Description: Matplotlib version 1.5.1, Python version 2.7.6 (Enthought Canopy) and OSX As detailed in this stack overflow post, you have to explicitly specify the minor tick locations on a log scaled color bar. It would be nice if matplotlib would do...
Open Graph Description: Matplotlib version 1.5.1, Python version 2.7.6 (Enthought Canopy) and OSX As detailed in this stack overflow post, you have to explicitly specify the minor tick locations on a log scaled color bar....
X Description: Matplotlib version 1.5.1, Python version 2.7.6 (Enthought Canopy) and OSX As detailed in this stack overflow post, you have to explicitly specify the minor tick locations on a log scaled color bar....
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7141
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature request: auto locate minor ticks on log scaled color bar","articleBody":"Matplotlib version 1.5.1, Python version 2.7.6 (Enthought Canopy) and OSX\n\nAs detailed in this [stack overflow post](http://stackoverflow.com/questions/20079270/minor-ticks-in-matplotlibs-colorbar/20079644#20079644), you have to explicitly specify the minor tick locations on a log scaled color bar. It would be nice if matplotlib would do this for you, instead of having to call `minorticks = p.norm(np.hstack([np.arange(2, 10, 1)/10.0, np.arange(2, 10, 1)/1.0])` in the code below\n\n``` python\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import LogNorm\n\nx = np.linspace(1,10,10)\ny = np.linspace(1,10,10)\nX, Y = np.meshgrid(x,y)\nZ = np.abs(np.cos(X**2 - Y**2) * X**2 * Y)\nf, ax = plt.subplots()\np = plt.pcolormesh(X, Y, Z, norm=LogNorm(), vmin=1e-2, vmax=1e2)\ncb = plt.colorbar(p, ax=ax, orientation='horizontal', aspect=10)\n# We need to nomalize the tick locations so that they're in the range from 0-1...\nminorticks = p.norm(np.hstack([np.arange(2, 10, 1)/10.0, np.arange(2, 10, 1)/1.0]))\ncb.ax.xaxis.set_ticks(minorticks, minor=True)\nplt.show()\n```\n","author":{"url":"https://github.com/breedlun","@type":"Person","name":"breedlun"},"datePublished":"2016-09-20T04:01:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/7141/matplotlib/issues/7141"}
| 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:b6301f12-d948-5d47-7608-6cc994c7cbff |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 90AC:2FB9D6:C6E50A:10C43CA:6A52A28D |
| html-safe-nonce | da84b1bfff8e6ba1eb3106454a5d1395015a61bb640cd5081bc88103d06611f0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MEFDOjJGQjlENjpDNkU1MEE6MTBDNDNDQTo2QTUyQTI4RCIsInZpc2l0b3JfaWQiOiI4NDYzMTE2NzUwODM3NDI0NzgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 244f91b5075d1b2c652cdaaab2deaa27bab98303609c1150b9a22a0684df9403 |
| hovercard-subject-tag | issue:177958458 |
| 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/7141/issue_layout |
| twitter:image | https://opengraph.githubassets.com/93e804133d7afeeab539fdcce2ae6eb724ec0011bf630e5788392195ee5df804/matplotlib/matplotlib/issues/7141 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/93e804133d7afeeab539fdcce2ae6eb724ec0011bf630e5788392195ee5df804/matplotlib/matplotlib/issues/7141 |
| og:image:alt | Matplotlib version 1.5.1, Python version 2.7.6 (Enthought Canopy) and OSX As detailed in this stack overflow post, you have to explicitly specify the minor tick locations on a log scaled color bar.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | breedlun |
| 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