{"action":"created","issue":{"url":"https://api.github.com/repos/silx-kit/silx/issues/2173","repository_url":"https://api.github.com/repos/silx-kit/silx","labels_url":"https://api.github.com/repos/silx-kit/silx/issues/2173/labels{/name}","comments_url":"https://api.github.com/repos/silx-kit/silx/issues/2173/comments","events_url":"https://api.github.com/repos/silx-kit/silx/issues/2173/events","html_url":"https://github.com/silx-kit/silx/pull/2173","id":369091309,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyMTE0MjMy","number":2173,"title":"Add alpha channel to ScatterView","user":{"login":"maurov","id":545294,"node_id":"MDQ6VXNlcjU0NTI5NA==","avatar_url":"https://avatars2.githubusercontent.com/u/545294?v=4","gravatar_id":"","url":"https://api.github.com/users/maurov","html_url":"https://github.com/maurov","followers_url":"https://api.github.com/users/maurov/followers","following_url":"https://api.github.com/users/maurov/following{/other_user}","gists_url":"https://api.github.com/users/maurov/gists{/gist_id}","starred_url":"https://api.github.com/users/maurov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maurov/subscriptions","organizations_url":"https://api.github.com/users/maurov/orgs","repos_url":"https://api.github.com/users/maurov/repos","events_url":"https://api.github.com/users/maurov/events{/privacy}","received_events_url":"https://api.github.com/users/maurov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-11T12:12:04Z","updated_at":"2018-10-11T12:33:47Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/silx-kit/silx/pulls/2173","html_url":"https://github.com/silx-kit/silx/pull/2173","diff_url":"https://github.com/silx-kit/silx/pull/2173.diff","patch_url":"https://github.com/silx-kit/silx/pull/2173.patch"},"body":"It adds the possibility to give a transparency channel in addition to the value.\r\n\r\nA minimal example to see its behaviour:\r\n\r\n```\r\nimport numpy as np\r\nfrom silx import config\r\nfrom silx import sx\r\nfrom silx.gui.plot.ScatterView import ScatterView\r\n\r\nsamps = 1000\r\nlevels = 100\r\nfwhm = 50\r\ncen = 500\r\n\r\nx = np.random.rand(samps)*levels\r\ny = np.random.rand(samps)*levels\r\nv = np.random.rand(samps)*levels\r\nx0, y0 = x[cen], y[cen]\r\na = np.exp(-4*np.log(2) * ((x-x0)**2 + (y-y0)**2) / fwhm**2)\r\n\r\nconfig.DEFAULT_COLORMAP_NAME = 'viridis'\r\n\r\n#without transparency\r\ns1 = ScatterView()                                                \r\ns1.setData(x, y, v)\r\ns1.show()\r\n#with transparency\r\ns2 = ScatterView()\r\ns2.setData(x, y, v, alpha=a)\r\ns2.show()\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/silx-kit/silx/issues/comments/428937807","html_url":"https://github.com/silx-kit/silx/pull/2173#issuecomment-428937807","issue_url":"https://api.github.com/repos/silx-kit/silx/issues/2173","id":428937807,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODkzNzgwNw==","user":{"login":"vasole","id":5636251,"node_id":"MDQ6VXNlcjU2MzYyNTE=","avatar_url":"https://avatars2.githubusercontent.com/u/5636251?v=4","gravatar_id":"","url":"https://api.github.com/users/vasole","html_url":"https://github.com/vasole","followers_url":"https://api.github.com/users/vasole/followers","following_url":"https://api.github.com/users/vasole/following{/other_user}","gists_url":"https://api.github.com/users/vasole/gists{/gist_id}","starred_url":"https://api.github.com/users/vasole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasole/subscriptions","organizations_url":"https://api.github.com/users/vasole/orgs","repos_url":"https://api.github.com/users/vasole/repos","events_url":"https://api.github.com/users/vasole/events{/privacy}","received_events_url":"https://api.github.com/users/vasole/received_events","type":"User","site_admin":false},"created_at":"2018-10-11T12:33:47Z","updated_at":"2018-10-11T12:33:47Z","author_association":"MEMBER","body":"I would support these cases:\r\n\r\n- Alpha between 0 and 1 -> Float\r\n- Alpha as integer in the range [0, 255]\r\n- Alpha given as color (I think that was already in)\r\n\r\nPlease do nothing and wait for @t20100 opinion.\r\n\r\nShould we allow something similar for images at same Z order? After all we aim at having most of the functionalities common between scatter plots and images."}}
{"actor":{"display_login":"vasole"}}