{"action":"created","issue":{"url":"https://api.github.com/repos/jakevdp/mpld3/issues/299","labels_url":"https://api.github.com/repos/jakevdp/mpld3/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/jakevdp/mpld3/issues/299/comments","events_url":"https://api.github.com/repos/jakevdp/mpld3/issues/299/events","html_url":"https://github.com/jakevdp/mpld3/pull/299","id":85660698,"number":299,"title":"interactive legend - alpha_unsel and alpha_over","user":{"login":"fdeheeger","id":473756,"avatar_url":"https://avatars.githubusercontent.com/u/473756?v=3","gravatar_id":"","url":"https://api.github.com/users/fdeheeger","html_url":"https://github.com/fdeheeger","followers_url":"https://api.github.com/users/fdeheeger/followers","following_url":"https://api.github.com/users/fdeheeger/following{/other_user}","gists_url":"https://api.github.com/users/fdeheeger/gists{/gist_id}","starred_url":"https://api.github.com/users/fdeheeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdeheeger/subscriptions","organizations_url":"https://api.github.com/users/fdeheeger/orgs","repos_url":"https://api.github.com/users/fdeheeger/repos","events_url":"https://api.github.com/users/fdeheeger/events{/privacy}","received_events_url":"https://api.github.com/users/fdeheeger/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-06T00:08:15Z","updated_at":"2015-06-09T17:24:55Z","closed_at":"2015-06-09T17:04:46Z","pull_request":{"url":"https://api.github.com/repos/jakevdp/mpld3/pulls/299","html_url":"https://github.com/jakevdp/mpld3/pull/299","diff_url":"https://github.com/jakevdp/mpld3/pull/299.diff","patch_url":"https://github.com/jakevdp/mpld3/pull/299.patch"},"body":"I wanted to report a bug for the `InteractiveLegend` on a quite common use case: line + fill_between (used as a confidence interval), but i decided to spend some time to try to fix it... \r\nAnd as a result of this time, here is some ideas about the `InteractiveLegend` plugin (which is an amazing feature, thanks a lot !).\r\n\r\nThe 2 original parameters of the plugin `alpha_sel` and `alpha_unsel` are applied to all objects associated with the legend items and so after a select / unselect both line and associated confidence interval are using the same alpha.\r\nIn this proposal, i only define `alpha_unsel` which is used as a ratio of the alpha defined in matplotlib. It allows to still distinguish the line from the confidence interval \"on click\" and switch back to the alpha defined in the original matplotlib figure.\r\n\r\nA demo might be useful: http://nbviewer.ipython.org/gist/fdeheeger/745c349477dc72b12be1 \r\n\r\nBecause i was happy with the result (and because it was friday afternoon), i also played with mouseover on the legend. A second parameter `alpha_over` is again a ratio of the original alpha used to highlight objects. (i also use that parameter to multiply the line width.. just a try)\r\n\r\nDifferent configurations are useful:\r\n  - `alpha_unsel` fixed at 0 make objects invisible when unselected\r\n  - `alpha_over` fixed at 1 disable the mouseover\r\n\r\nAnother idea (not implemented.. i am slow with javascript !): on large legend i thought that it might be nice not to need to click to sel/unsel objects and only use the mouse over to add or remove lines from the figure.\r\n\r\nIt is not a polished PR but i wanted to share it with you ! Any comments ?"},"comment":{"url":"https://api.github.com/repos/jakevdp/mpld3/issues/comments/110439523","html_url":"https://github.com/jakevdp/mpld3/pull/299#issuecomment-110439523","issue_url":"https://api.github.com/repos/jakevdp/mpld3/issues/299","id":110439523,"user":{"login":"aflaxman","id":51236,"avatar_url":"https://avatars.githubusercontent.com/u/51236?v=3","gravatar_id":"","url":"https://api.github.com/users/aflaxman","html_url":"https://github.com/aflaxman","followers_url":"https://api.github.com/users/aflaxman/followers","following_url":"https://api.github.com/users/aflaxman/following{/other_user}","gists_url":"https://api.github.com/users/aflaxman/gists{/gist_id}","starred_url":"https://api.github.com/users/aflaxman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aflaxman/subscriptions","organizations_url":"https://api.github.com/users/aflaxman/orgs","repos_url":"https://api.github.com/users/aflaxman/repos","events_url":"https://api.github.com/users/aflaxman/events{/privacy}","received_events_url":"https://api.github.com/users/aflaxman/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T17:24:55Z","updated_at":"2015-06-09T17:24:55Z","body":"We made a list of things to do for calling 0.3 done here: #278 , but considering the slow pace of development, maybe we should scale that back.  "}}