{"action":"opened","issue":{"url":"https://api.github.com/repos/nguy/artview/issues/137","repository_url":"https://api.github.com/repos/nguy/artview","labels_url":"https://api.github.com/repos/nguy/artview/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/nguy/artview/issues/137/comments","events_url":"https://api.github.com/repos/nguy/artview/issues/137/events","html_url":"https://github.com/nguy/artview/issues/137","id":142412757,"number":137,"title":"Add Discrete Color Bars","user":{"login":"stechma2","id":6628522,"avatar_url":"https://avatars.githubusercontent.com/u/6628522?v=3","gravatar_id":"","url":"https://api.github.com/users/stechma2","html_url":"https://github.com/stechma2","followers_url":"https://api.github.com/users/stechma2/followers","following_url":"https://api.github.com/users/stechma2/following{/other_user}","gists_url":"https://api.github.com/users/stechma2/gists{/gist_id}","starred_url":"https://api.github.com/users/stechma2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stechma2/subscriptions","organizations_url":"https://api.github.com/users/stechma2/orgs","repos_url":"https://api.github.com/users/stechma2/repos","events_url":"https://api.github.com/users/stechma2/events{/privacy}","received_events_url":"https://api.github.com/users/stechma2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-21T17:18:47Z","updated_at":"2016-03-21T17:18:47Z","closed_at":null,"body":"It would be useful if discrete color bars could be used (and easily created, if possible). For example, I wanted a discrete color table to visually identify possible ground contamination in tail radar sweeps. Obviously discrete color bars are desired in many other situations as well.\r\n\r\nI used the following code to add a quick and dirty discrete color bar to the ARTview displays, though as implemented, it hard codes the color table, preventing it from being changed within the GUI.\r\n\r\n`cmapLevs = [-2,-0.5,0,0.5,2]\r\ncmapCol = ['black','black','red','red','black','black']\r\nvelGrndCmap, normVelGrnd = matplotlib.colors.from_levels_and_colors(cmapLevs,cmapVelCol,extend='both')`\r\n\r\n"}}