{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7141","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7141/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7141/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7141/events","html_url":"https://github.com/matplotlib/matplotlib/issues/7141","id":177958458,"number":7141,"title":"Feature request: auto locate minor ticks on log scaled color bar","user":{"login":"breedlun","id":4099759,"avatar_url":"https://avatars.githubusercontent.com/u/4099759?v=3","gravatar_id":"","url":"https://api.github.com/users/breedlun","html_url":"https://github.com/breedlun","followers_url":"https://api.github.com/users/breedlun/followers","following_url":"https://api.github.com/users/breedlun/following{/other_user}","gists_url":"https://api.github.com/users/breedlun/gists{/gist_id}","starred_url":"https://api.github.com/users/breedlun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breedlun/subscriptions","organizations_url":"https://api.github.com/users/breedlun/orgs","repos_url":"https://api.github.com/users/breedlun/repos","events_url":"https://api.github.com/users/breedlun/events{/privacy}","received_events_url":"https://api.github.com/users/breedlun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-20T04:01:58Z","updated_at":"2016-09-20T17:26:19Z","closed_at":null,"body":"Matplotlib version 1.5.1, Python version 2.7.6 (Enthought Canopy) and OSX\r\n\r\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\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.colors import LogNorm\r\n\r\nx = np.linspace(1,10,10)\r\ny = np.linspace(1,10,10)\r\nX, Y = np.meshgrid(x,y)\r\nZ = np.abs(np.cos(X**2 - Y**2) * X**2 * Y)\r\nf, ax = plt.subplots()\r\np = plt.pcolormesh(X, Y, Z, norm=LogNorm(), vmin=1e-2, vmax=1e2)\r\ncb = plt.colorbar(p, ax=ax, orientation='horizontal', aspect=10)\r\n# We need to nomalize the tick locations so that they're in the range from 0-1...\r\nminorticks = p.norm(np.hstack([np.arange(2, 10, 1)/10.0, np.arange(2, 10, 1)/1.0]))\r\ncb.ax.xaxis.set_ticks(minorticks, minor=True)\r\nplt.show()\r\n```"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/248371438","html_url":"https://github.com/matplotlib/matplotlib/issues/7141#issuecomment-248371438","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7141","id":248371438,"user":{"login":"Kojoley","id":2743474,"avatar_url":"https://avatars.githubusercontent.com/u/2743474?v=3","gravatar_id":"","url":"https://api.github.com/users/Kojoley","html_url":"https://github.com/Kojoley","followers_url":"https://api.github.com/users/Kojoley/followers","following_url":"https://api.github.com/users/Kojoley/following{/other_user}","gists_url":"https://api.github.com/users/Kojoley/gists{/gist_id}","starred_url":"https://api.github.com/users/Kojoley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kojoley/subscriptions","organizations_url":"https://api.github.com/users/Kojoley/orgs","repos_url":"https://api.github.com/users/Kojoley/repos","events_url":"https://api.github.com/users/Kojoley/events{/privacy}","received_events_url":"https://api.github.com/users/Kojoley/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T17:26:19Z","updated_at":"2016-09-20T17:26:19Z","body":"![default](https://cloud.githubusercontent.com/assets/2743474/18681370/71320bd8-7f70-11e6-9ade-ddbb24a7c0f0.png)\r\n![with minor ticks](https://cloud.githubusercontent.com/assets/2743474/18681369/7131805a-7f70-11e6-9964-955f1f703f8b.png)\r\n"}}
{"actor":{"display_login":"Kojoley"}}