{"action":"closed","issue":{"url":"https://api.github.com/repos/altair-viz/altair/issues/270","repository_url":"https://api.github.com/repos/altair-viz/altair","labels_url":"https://api.github.com/repos/altair-viz/altair/issues/270/labels{/name}","comments_url":"https://api.github.com/repos/altair-viz/altair/issues/270/comments","events_url":"https://api.github.com/repos/altair-viz/altair/issues/270/events","html_url":"https://github.com/altair-viz/altair/issues/270","id":190108634,"number":270,"title":"Hiding the legend for a channel","user":{"login":"dhimmel","id":1117703,"avatar_url":"https://avatars1.githubusercontent.com/u/1117703?v=4","gravatar_id":"","url":"https://api.github.com/users/dhimmel","html_url":"https://github.com/dhimmel","followers_url":"https://api.github.com/users/dhimmel/followers","following_url":"https://api.github.com/users/dhimmel/following{/other_user}","gists_url":"https://api.github.com/users/dhimmel/gists{/gist_id}","starred_url":"https://api.github.com/users/dhimmel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhimmel/subscriptions","organizations_url":"https://api.github.com/users/dhimmel/orgs","repos_url":"https://api.github.com/users/dhimmel/repos","events_url":"https://api.github.com/users/dhimmel/events{/privacy}","received_events_url":"https://api.github.com/users/dhimmel/received_events","type":"User","site_admin":false},"labels":[{"id":474065037,"url":"https://api.github.com/repos/altair-viz/altair/labels/vega-lite-related","name":"vega-lite-related","color":"e99695","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/altair-viz/altair/milestones/4","html_url":"https://github.com/altair-viz/altair/milestone/4","labels_url":"https://api.github.com/repos/altair-viz/altair/milestones/4/labels","id":2142418,"number":4,"title":"1.3","description":null,"creator":{"login":"jakevdp","id":781659,"avatar_url":"https://avatars0.githubusercontent.com/u/781659?v=4","gravatar_id":"","url":"https://api.github.com/users/jakevdp","html_url":"https://github.com/jakevdp","followers_url":"https://api.github.com/users/jakevdp/followers","following_url":"https://api.github.com/users/jakevdp/following{/other_user}","gists_url":"https://api.github.com/users/jakevdp/gists{/gist_id}","starred_url":"https://api.github.com/users/jakevdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakevdp/subscriptions","organizations_url":"https://api.github.com/users/jakevdp/orgs","repos_url":"https://api.github.com/users/jakevdp/repos","events_url":"https://api.github.com/users/jakevdp/events{/privacy}","received_events_url":"https://api.github.com/users/jakevdp/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":11,"state":"open","created_at":"2016-11-17T18:26:29Z","updated_at":"2018-05-01T21:59:18Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2016-11-17T17:16:45Z","updated_at":"2018-05-01T21:59:18Z","closed_at":"2018-05-01T21:59:18Z","author_association":"NONE","body":"In vega-lite JSON, under `encoding` I was able to do the following:\r\n\r\n```json\r\n\"opacity\": {\r\n  \"field\": \"positives\",\r\n  \"type\": \"quantitative\",\r\n  \"legend\": false\r\n}\r\n```\r\n\r\nThe `\"legend\": false` line suppressed the rendering of the opacity legend.\r\n\r\nIn altair, I tried specifying the following argument for `.encode()`:\r\n\r\n```Python\r\nopacity = altair.Opacity('positives', legend=False)\r\n```\r\n\r\nThis raised the error:\r\n\r\n```\r\nTraitError: The 'legend' trait of an Opacity instance must be a Legend or None, but a value of class 'bool' (i.e. False) was specified.\r\n```\r\n\r\nAny way to hide the legend for a channel in altair?"}}
{"actor":{"display_login":"jakevdp"}}