{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4748","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4748/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4748/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4748/events","html_url":"https://github.com/matplotlib/matplotlib/issues/4748","id":96058929,"number":4748,"title":"That colorbar.set_ticks can take a locator is not documented sufficently","user":{"login":"Tillsten","id":189880,"avatar_url":"https://avatars.githubusercontent.com/u/189880?v=3","gravatar_id":"","url":"https://api.github.com/users/Tillsten","html_url":"https://github.com/Tillsten","followers_url":"https://api.github.com/users/Tillsten/followers","following_url":"https://api.github.com/users/Tillsten/following{/other_user}","gists_url":"https://api.github.com/users/Tillsten/gists{/gist_id}","starred_url":"https://api.github.com/users/Tillsten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tillsten/subscriptions","organizations_url":"https://api.github.com/users/Tillsten/orgs","repos_url":"https://api.github.com/users/Tillsten/repos","events_url":"https://api.github.com/users/Tillsten/events{/privacy}","received_events_url":"https://api.github.com/users/Tillsten/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/Documentation","name":"Documentation","color":"0015ff"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/20","html_url":"https://github.com/matplotlib/matplotlib/milestones/2.0.1%20(next%20bug%20fix%20release)","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/20/labels","id":1306895,"number":20,"title":"2.0.1 (next bug fix release)","description":"","creator":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars.githubusercontent.com/u/199813?v=3","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":144,"closed_issues":18,"state":"open","created_at":"2015-09-15T17:47:44Z","updated_at":"2016-09-09T01:05:41Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-07-20T13:02:51Z","updated_at":"2016-09-09T07:42:43Z","closed_at":null,"body":"Should be an easy fix, just add the set_ methods and send them to the right axis."},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/245842794","html_url":"https://github.com/matplotlib/matplotlib/issues/4748#issuecomment-245842794","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4748","id":245842794,"user":{"login":"pierre-haessig","id":1010404,"avatar_url":"https://avatars.githubusercontent.com/u/1010404?v=3","gravatar_id":"","url":"https://api.github.com/users/pierre-haessig","html_url":"https://github.com/pierre-haessig","followers_url":"https://api.github.com/users/pierre-haessig/followers","following_url":"https://api.github.com/users/pierre-haessig/following{/other_user}","gists_url":"https://api.github.com/users/pierre-haessig/gists{/gist_id}","starred_url":"https://api.github.com/users/pierre-haessig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierre-haessig/subscriptions","organizations_url":"https://api.github.com/users/pierre-haessig/orgs","repos_url":"https://api.github.com/users/pierre-haessig/repos","events_url":"https://api.github.com/users/pierre-haessig/events{/privacy}","received_events_url":"https://api.github.com/users/pierre-haessig/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T07:42:43Z","updated_at":"2016-09-09T07:42:43Z","body":"Use case: I wanted to reduce the `nbins` param as I often do with Axes (but I guess mpl 2.0 has a better default...). \r\n\r\nSince the locator object being used is not accessible, I did:\r\n\r\n```\r\ncbar = fig.colorbar(im)\r\ncbar.set_ticks(mpl.ticker.MaxNLocator(nbins=3, steps=[1, 2, 5, 10]))\r\n```\r\n\r\nwhich in effect recreates manually a new `AutoLocator` (as of mpl 1.5) with a smaller `nbins`.\r\nIt works well, but it slightly complicated.\r\n\r\n@efiring : just to be sure I got your explanation. There situation where the type of locator might be changed multiple times after the creation of the colorbar?\r\n\r\nIn that case, there are maybe other ways to flag the \"automatic\" behavior. For example, would it be possible to assign a string `'auto'` (or `None`) to `self.ticks` instead of `None` to `self.locator` ?"}}
{"actor":{"display_login":"pierre-haessig"}}