{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6540","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6540/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6540/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6540/events","html_url":"https://github.com/matplotlib/matplotlib/issues/6540","id":158604828,"number":6540,"title":"imshow(..., alpha=0.5) produces different results in 2.x","user":{"login":"QuLogic","id":302469,"avatar_url":"https://avatars.githubusercontent.com/u/302469?v=3","gravatar_id":"","url":"https://api.github.com/users/QuLogic","html_url":"https://github.com/QuLogic","followers_url":"https://api.github.com/users/QuLogic/followers","following_url":"https://api.github.com/users/QuLogic/following{/other_user}","gists_url":"https://api.github.com/users/QuLogic/gists{/gist_id}","starred_url":"https://api.github.com/users/QuLogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuLogic/subscriptions","organizations_url":"https://api.github.com/users/QuLogic/orgs","repos_url":"https://api.github.com/users/QuLogic/repos","events_url":"https://api.github.com/users/QuLogic/events{/privacy}","received_events_url":"https://api.github.com/users/QuLogic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/matplotlib/matplotlib/labels/Alpha%20color","name":"Alpha color","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/14","html_url":"https://github.com/matplotlib/matplotlib/milestones/2.0%20(style%20change%20major%20release)","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/14/labels","id":662004,"number":14,"title":"2.0 (style change major release)","description":"Style changes only","creator":{"login":"tacaswell","id":199813,"avatar_url":"https://avatars.githubusercontent.com/u/199813?v=3","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"open_issues":33,"closed_issues":346,"state":"open","created_at":"2014-05-17T14:28:22Z","updated_at":"2016-06-07T20:08:53Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-06-06T05:47:18Z","updated_at":"2016-06-08T01:09:57Z","closed_at":null,"body":"I think I have whittled this down sufficiently from the Cartopy example that is failing. Running `imshow(..., alpha=0.5)` produces a different result in 2.0.0b1 vs. 1.5.1 (both installed via conda.)\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib as mpl\r\n\r\n# mpl.style.use('classic')\r\n\r\nim = np.zeros((100, 100, 3), dtype=np.uint8)\r\nplt.imshow(im, extent=(1, 10, 1, 10), alpha=0.5)\r\nplt.xlim(0, 11)\r\nplt.ylim(0, 11)\r\n\r\nplt.savefig('imshow_alpha.png')\r\n```\r\n\r\nUsing 1.5.1:\r\n![imshow_alpha_1 5 1](https://cloud.githubusercontent.com/assets/302469/15812915/443b626e-2b88-11e6-89ca-14c0afbf4648.png)\r\nUsing 2.0.0b1:\r\n![imshow_alpha_2 0](https://cloud.githubusercontent.com/assets/302469/15812917/4d8bc746-2b88-11e6-8e9f-68a37cd456d6.png)\r\nUsing 2.0.0b1 with the classic style:\r\n![imshow_alpha_2 0_classic](https://cloud.githubusercontent.com/assets/302469/15812919/543d038e-2b88-11e6-9607-e80ae97955f6.png)\r\n\r\nGIMP tells me that the first is 50%, while the latter two are 75%."},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/224459897","html_url":"https://github.com/matplotlib/matplotlib/issues/6540#issuecomment-224459897","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6540","id":224459897,"user":{"login":"QuLogic","id":302469,"avatar_url":"https://avatars.githubusercontent.com/u/302469?v=3","gravatar_id":"","url":"https://api.github.com/users/QuLogic","html_url":"https://github.com/QuLogic","followers_url":"https://api.github.com/users/QuLogic/followers","following_url":"https://api.github.com/users/QuLogic/following{/other_user}","gists_url":"https://api.github.com/users/QuLogic/gists{/gist_id}","starred_url":"https://api.github.com/users/QuLogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuLogic/subscriptions","organizations_url":"https://api.github.com/users/QuLogic/orgs","repos_url":"https://api.github.com/users/QuLogic/repos","events_url":"https://api.github.com/users/QuLogic/events{/privacy}","received_events_url":"https://api.github.com/users/QuLogic/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T01:09:57Z","updated_at":"2016-06-08T01:09:57Z","body":"I tried GTK3Cairo, but it's current broken:\r\n```\r\nTraceback (most recent call last):\r\n  File \".../lib/matplotlib/backends/backend_gtk3cairo.py\", line 45, in on_draw_event\r\n    self._render_figure(w, h)\r\n  File \".../lib/matplotlib/backends/backend_gtk3cairo.py\", line 34, in _render_figure\r\n    self.figure.draw (self._renderer)\r\n  File \".../lib/matplotlib/artist.py\", line 63, in draw_wrapper\r\n    draw(artist, renderer, *args, **kwargs)\r\n  File \".../lib/matplotlib/figure.py\", line 1129, in draw\r\n    renderer, self, dsu, self.suppressComposite)\r\n  File \".../lib/matplotlib/image.py\", line 139, in _draw_list_compositing_images\r\n    a.draw(renderer)\r\n  File \".../lib/matplotlib/artist.py\", line 63, in draw_wrapper\r\n    draw(artist, renderer, *args, **kwargs)\r\n  File \".../lib/matplotlib/axes/_base.py\", line 2373, in draw\r\n    mimage._draw_list_compositing_images(renderer, self, dsu)\r\n  File \".../lib/matplotlib/image.py\", line 163, in _draw_list_compositing_images\r\n    flush_images()\r\n  File \".../lib/matplotlib/image.py\", line 147, in flush_images\r\n    image_group[0].draw(renderer)\r\n  File \".../lib/matplotlib/artist.py\", line 63, in draw_wrapper\r\n    draw(artist, renderer, *args, **kwargs)\r\n  File \".../lib/matplotlib/image.py\", line 472, in draw\r\n    renderer.draw_image(gc, l, b, im)\r\n  File \".../lib/matplotlib/backends/backend_cairo.py\", line 180, in draw_image\r\n    im.shape[1]*4)\r\nTypeError: expected a writeable buffer object\r\n```"}}
{"actor":{"display_login":"QuLogic"}}