{"action":"opened","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4412","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4412/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4412/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/4412/events","html_url":"https://github.com/matplotlib/matplotlib/issues/4412","id":73843943,"number":4412,"title":"clabel support for manual singleton levels","user":{"login":"ocehugo","id":1202691,"avatar_url":"https://avatars.githubusercontent.com/u/1202691?v=3","gravatar_id":"","url":"https://api.github.com/users/ocehugo","html_url":"https://github.com/ocehugo","followers_url":"https://api.github.com/users/ocehugo/followers","following_url":"https://api.github.com/users/ocehugo/following{/other_user}","gists_url":"https://api.github.com/users/ocehugo/gists{/gist_id}","starred_url":"https://api.github.com/users/ocehugo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocehugo/subscriptions","organizations_url":"https://api.github.com/users/ocehugo/orgs","repos_url":"https://api.github.com/users/ocehugo/repos","events_url":"https://api.github.com/users/ocehugo/events{/privacy}","received_events_url":"https://api.github.com/users/ocehugo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-07T05:03:05Z","updated_at":"2015-05-07T05:03:05Z","closed_at":null,"body":"Hi,\r\nI believe there is room for improvement the manual keyword of the clabel function.\r\n\r\nScenario:\r\nUser contourf a field, and want a single clabel at a fixed location for the \"10\" value line in the map locations xpos,ypos. So He uses:\r\n\r\n```clabel_ticks=clabel(CS,[10],manual=((xpos,ypos))``` \r\n\r\nThis raise an error ,```int object not iterable```, since manual keyword only accept boolean (True/False for mouse/keyboard input) or a tuple iterable. So he cheat and request this:\r\n\r\n```clabel_ticks=clabel(CS,[10],manual=((xpos,ypos),(xpos,ypos)))``` \r\n\r\nSo two ticks appears close to each other making the ticks a mess.\r\n\r\nThe workaround, ```clabel_ticks[0].set_alpha(0.0)``` works like a charm, but I believe that support to just one position in manual keyword in clabel should be the standard, since it's the simple case.\r\n\r\nSo if someone want to try to simple select a fixed location (xpos,ypos) and try to make the ticks closest as possible to this location it's just a matter of using a singleton manual value. This is particularly useful when you dont want to search for the closest position of that line or want the ticks where some operator is smooth ( like a gradient operator - you dont want the ticks around squeezed lines but on stretched out spaces ).\r\n\r\nCheck the following gist: https://gist.github.com/ocehugo/95552d8f3a4c2ebb0ec3\r\n\r\nPS: I also noted some glitches when using clabel. Some white cuts around a contourf when selecting some individual levels (clabel(CS,[lvl])). Looks like a polygon is draw when ticks are positioned. \r\n\r\n\r\n![figure_1](https://cloud.githubusercontent.com/assets/1202691/7508789/e67e591e-f4c5-11e4-83ff-efa98e36439f.png)\r\n![figure_2](https://cloud.githubusercontent.com/assets/1202691/7508790/e85ce5f2-f4c5-11e4-8e4b-6eee180a5ae2.png)\r\n\r\n"}}