{"action":"closed","number":10747,"pull_request":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/10747","id":174193873,"html_url":"https://github.com/matplotlib/matplotlib/pull/10747","diff_url":"https://github.com/matplotlib/matplotlib/pull/10747.diff","patch_url":"https://github.com/matplotlib/matplotlib/pull/10747.patch","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10747","number":10747,"state":"closed","locked":false,"title":"Fix bug \"Setting an alpha value to a Poly3DCollection #10237\"","user":{"login":"JZCJackson","id":31714075,"avatar_url":"https://avatars0.githubusercontent.com/u/31714075?v=4","gravatar_id":"","url":"https://api.github.com/users/JZCJackson","html_url":"https://github.com/JZCJackson","followers_url":"https://api.github.com/users/JZCJackson/followers","following_url":"https://api.github.com/users/JZCJackson/following{/other_user}","gists_url":"https://api.github.com/users/JZCJackson/gists{/gist_id}","starred_url":"https://api.github.com/users/JZCJackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JZCJackson/subscriptions","organizations_url":"https://api.github.com/users/JZCJackson/orgs","repos_url":"https://api.github.com/users/JZCJackson/repos","events_url":"https://api.github.com/users/JZCJackson/events{/privacy}","received_events_url":"https://api.github.com/users/JZCJackson/received_events","type":"User","site_admin":false},"body":"## PR Summary\r\nIn order to set alpha successfully. In Poly3DCollection's set_alpha, facecolors3d should equal to facecolors.\r\n## PR Checklist\r\n\r\n- [ ] Has Pytest style unit tests\r\n- [ ] Code is PEP 8 compliant\r\n- [ ] New features are documented, with examples if plot related\r\n- [ ] Documentation is sphinx and numpydoc compliant\r\n- [ ] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)\r\n- [ ] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way\r\n\r\nSnippet of code:\r\nIn latest version these two cases can not show the transparency of the graph. In my feature branch it has been fixed.\r\nCase 1 (Setting facecolor and alpha individually, facecolor first):\r\n\r\nfrom mpl_toolkits.mplot3d import Axes3D\r\nfrom mpl_toolkits.mplot3d.art3d import Poly3DCollection\r\nimport matplotlib.pyplot as plt\r\n\r\nfig = plt.figure()\r\nax = Axes3D(fig)\r\nx = [1, 0.9, 1, 0]\r\ny = [0, 0.7, 0, 1]\r\nz = [0, 0.8, 1, 0]\r\nverts = [list(zip(x, y, z))]\r\n\r\nalpha=0.4\r\nfc = \"C0\"\r\n\r\npc = Poly3DCollection(verts, linewidths=1)\r\npc.set_facecolor(fc)\r\npc.set_alpha(alpha)\r\nax.add_collection3d(pc)\r\nplt.show()\r\n\r\nCase 2 (Setting facecolors and alpha at instantiation):\r\n\r\nfrom mpl_toolkits.mplot3d import Axes3D\r\nfrom mpl_toolkits.mplot3d.art3d import Poly3DCollection\r\nimport matplotlib.pyplot as plt\r\n\r\nfig = plt.figure()\r\nax = Axes3D(fig)\r\nx = [1, 0.9, 1, 0]\r\ny = [0, 0.7, 0, 1]\r\nz = [0, 0.8, 1, 0]\r\nverts = [list(zip(x, y, z))]\r\n\r\nalpha=0.4\r\nfc = \"C0\"\r\npc = Poly3DCollection(verts, alpha = alpha, facecolors=fc,\r\nlinewidths=1)\r\nax.add_collection3d(pc)\r\nplt.show()\r\n\r\n","created_at":"2018-03-10T22:54:46Z","updated_at":"2018-03-12T17:00:00Z","closed_at":"2018-03-12T16:59:59Z","merged_at":null,"merge_commit_sha":"3d8f27017c2b6863f94f74cb1469cb21894a8526","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/10747/commits","review_comments_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/10747/comments","review_comment_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/10747/comments","statuses_url":"https://api.github.com/repos/matplotlib/matplotlib/statuses/ed84e1bb6ba6c1d0131e2f26d959f063f1970339","head":{"label":"JZCJackson:my-feature","ref":"my-feature","sha":"ed84e1bb6ba6c1d0131e2f26d959f063f1970339","user":{"login":"JZCJackson","id":31714075,"avatar_url":"https://avatars0.githubusercontent.com/u/31714075?v=4","gravatar_id":"","url":"https://api.github.com/users/JZCJackson","html_url":"https://github.com/JZCJackson","followers_url":"https://api.github.com/users/JZCJackson/followers","following_url":"https://api.github.com/users/JZCJackson/following{/other_user}","gists_url":"https://api.github.com/users/JZCJackson/gists{/gist_id}","starred_url":"https://api.github.com/users/JZCJackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JZCJackson/subscriptions","organizations_url":"https://api.github.com/users/JZCJackson/orgs","repos_url":"https://api.github.com/users/JZCJackson/repos","events_url":"https://api.github.com/users/JZCJackson/events{/privacy}","received_events_url":"https://api.github.com/users/JZCJackson/received_events","type":"User","site_admin":false},"repo":{"id":124703040,"name":"matplotlib","full_name":"JZCJackson/matplotlib","owner":{"login":"JZCJackson","id":31714075,"avatar_url":"https://avatars0.githubusercontent.com/u/31714075?v=4","gravatar_id":"","url":"https://api.github.com/users/JZCJackson","html_url":"https://github.com/JZCJackson","followers_url":"https://api.github.com/users/JZCJackson/followers","following_url":"https://api.github.com/users/JZCJackson/following{/other_user}","gists_url":"https://api.github.com/users/JZCJackson/gists{/gist_id}","starred_url":"https://api.github.com/users/JZCJackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JZCJackson/subscriptions","organizations_url":"https://api.github.com/users/JZCJackson/orgs","repos_url":"https://api.github.com/users/JZCJackson/repos","events_url":"https://api.github.com/users/JZCJackson/events{/privacy}","received_events_url":"https://api.github.com/users/JZCJackson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JZCJackson/matplotlib","description":"matplotlib: plotting with Python","fork":true,"url":"https://api.github.com/repos/JZCJackson/matplotlib","forks_url":"https://api.github.com/repos/JZCJackson/matplotlib/forks","keys_url":"https://api.github.com/repos/JZCJackson/matplotlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JZCJackson/matplotlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JZCJackson/matplotlib/teams","hooks_url":"https://api.github.com/repos/JZCJackson/matplotlib/hooks","issue_events_url":"https://api.github.com/repos/JZCJackson/matplotlib/issues/events{/number}","events_url":"https://api.github.com/repos/JZCJackson/matplotlib/events","assignees_url":"https://api.github.com/repos/JZCJackson/matplotlib/assignees{/user}","branches_url":"https://api.github.com/repos/JZCJackson/matplotlib/branches{/branch}","tags_url":"https://api.github.com/repos/JZCJackson/matplotlib/tags","blobs_url":"https://api.github.com/repos/JZCJackson/matplotlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JZCJackson/matplotlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JZCJackson/matplotlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/JZCJackson/matplotlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JZCJackson/matplotlib/statuses/{sha}","languages_url":"https://api.github.com/repos/JZCJackson/matplotlib/languages","stargazers_url":"https://api.github.com/repos/JZCJackson/matplotlib/stargazers","contributors_url":"https://api.github.com/repos/JZCJackson/matplotlib/contributors","subscribers_url":"https://api.github.com/repos/JZCJackson/matplotlib/subscribers","subscription_url":"https://api.github.com/repos/JZCJackson/matplotlib/subscription","commits_url":"https://api.github.com/repos/JZCJackson/matplotlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/JZCJackson/matplotlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/JZCJackson/matplotlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/JZCJackson/matplotlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/JZCJackson/matplotlib/contents/{+path}","compare_url":"https://api.github.com/repos/JZCJackson/matplotlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JZCJackson/matplotlib/merges","archive_url":"https://api.github.com/repos/JZCJackson/matplotlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JZCJackson/matplotlib/downloads","issues_url":"https://api.github.com/repos/JZCJackson/matplotlib/issues{/number}","pulls_url":"https://api.github.com/repos/JZCJackson/matplotlib/pulls{/number}","milestones_url":"https://api.github.com/repos/JZCJackson/matplotlib/milestones{/number}","notifications_url":"https://api.github.com/repos/JZCJackson/matplotlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JZCJackson/matplotlib/labels{/name}","releases_url":"https://api.github.com/repos/JZCJackson/matplotlib/releases{/id}","deployments_url":"https://api.github.com/repos/JZCJackson/matplotlib/deployments","created_at":"2018-03-10T22:17:35Z","updated_at":"2018-03-10T22:17:42Z","pushed_at":"2018-03-10T22:39:47Z","git_url":"git://github.com/JZCJackson/matplotlib.git","ssh_url":"git@github.com:JZCJackson/matplotlib.git","clone_url":"https://github.com/JZCJackson/matplotlib.git","svn_url":"https://github.com/JZCJackson/matplotlib","homepage":"http://matplotlib.org/","size":324187,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"matplotlib:master","ref":"master","sha":"aadd0e08c9137526242bdd07d05859da05e97937","user":{"login":"matplotlib","id":215947,"avatar_url":"https://avatars0.githubusercontent.com/u/215947?v=4","gravatar_id":"","url":"https://api.github.com/users/matplotlib","html_url":"https://github.com/matplotlib","followers_url":"https://api.github.com/users/matplotlib/followers","following_url":"https://api.github.com/users/matplotlib/following{/other_user}","gists_url":"https://api.github.com/users/matplotlib/gists{/gist_id}","starred_url":"https://api.github.com/users/matplotlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matplotlib/subscriptions","organizations_url":"https://api.github.com/users/matplotlib/orgs","repos_url":"https://api.github.com/users/matplotlib/repos","events_url":"https://api.github.com/users/matplotlib/events{/privacy}","received_events_url":"https://api.github.com/users/matplotlib/received_events","type":"Organization","site_admin":false},"repo":{"id":1385122,"name":"matplotlib","full_name":"matplotlib/matplotlib","owner":{"login":"matplotlib","id":215947,"avatar_url":"https://avatars0.githubusercontent.com/u/215947?v=4","gravatar_id":"","url":"https://api.github.com/users/matplotlib","html_url":"https://github.com/matplotlib","followers_url":"https://api.github.com/users/matplotlib/followers","following_url":"https://api.github.com/users/matplotlib/following{/other_user}","gists_url":"https://api.github.com/users/matplotlib/gists{/gist_id}","starred_url":"https://api.github.com/users/matplotlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matplotlib/subscriptions","organizations_url":"https://api.github.com/users/matplotlib/orgs","repos_url":"https://api.github.com/users/matplotlib/repos","events_url":"https://api.github.com/users/matplotlib/events{/privacy}","received_events_url":"https://api.github.com/users/matplotlib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matplotlib/matplotlib","description":"matplotlib: plotting with Python","fork":false,"url":"https://api.github.com/repos/matplotlib/matplotlib","forks_url":"https://api.github.com/repos/matplotlib/matplotlib/forks","keys_url":"https://api.github.com/repos/matplotlib/matplotlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matplotlib/matplotlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matplotlib/matplotlib/teams","hooks_url":"https://api.github.com/repos/matplotlib/matplotlib/hooks","issue_events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/events{/number}","events_url":"https://api.github.com/repos/matplotlib/matplotlib/events","assignees_url":"https://api.github.com/repos/matplotlib/matplotlib/assignees{/user}","branches_url":"https://api.github.com/repos/matplotlib/matplotlib/branches{/branch}","tags_url":"https://api.github.com/repos/matplotlib/matplotlib/tags","blobs_url":"https://api.github.com/repos/matplotlib/matplotlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matplotlib/matplotlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matplotlib/matplotlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/matplotlib/matplotlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matplotlib/matplotlib/statuses/{sha}","languages_url":"https://api.github.com/repos/matplotlib/matplotlib/languages","stargazers_url":"https://api.github.com/repos/matplotlib/matplotlib/stargazers","contributors_url":"https://api.github.com/repos/matplotlib/matplotlib/contributors","subscribers_url":"https://api.github.com/repos/matplotlib/matplotlib/subscribers","subscription_url":"https://api.github.com/repos/matplotlib/matplotlib/subscription","commits_url":"https://api.github.com/repos/matplotlib/matplotlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/matplotlib/matplotlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/matplotlib/matplotlib/contents/{+path}","compare_url":"https://api.github.com/repos/matplotlib/matplotlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matplotlib/matplotlib/merges","archive_url":"https://api.github.com/repos/matplotlib/matplotlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matplotlib/matplotlib/downloads","issues_url":"https://api.github.com/repos/matplotlib/matplotlib/issues{/number}","pulls_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls{/number}","milestones_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones{/number}","notifications_url":"https://api.github.com/repos/matplotlib/matplotlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/labels{/name}","releases_url":"https://api.github.com/repos/matplotlib/matplotlib/releases{/id}","deployments_url":"https://api.github.com/repos/matplotlib/matplotlib/deployments","created_at":"2011-02-19T03:17:12Z","updated_at":"2018-03-12T16:43:44Z","pushed_at":"2018-03-12T16:59:41Z","git_url":"git://github.com/matplotlib/matplotlib.git","ssh_url":"git@github.com:matplotlib/matplotlib.git","clone_url":"https://github.com/matplotlib/matplotlib.git","svn_url":"https://github.com/matplotlib/matplotlib","homepage":"http://matplotlib.org/","size":324240,"stargazers_count":6891,"watchers_count":6891,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3247,"mirror_url":null,"archived":false,"open_issues_count":1367,"license":null,"forks":3247,"open_issues":1367,"watchers":6891,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/10747"},"html":{"href":"https://github.com/matplotlib/matplotlib/pull/10747"},"issue":{"href":"https://api.github.com/repos/matplotlib/matplotlib/issues/10747"},"comments":{"href":"https://api.github.com/repos/matplotlib/matplotlib/issues/10747/comments"},"review_comments":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/10747/comments"},"review_comment":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/10747/commits"},"statuses":{"href":"https://api.github.com/repos/matplotlib/matplotlib/statuses/ed84e1bb6ba6c1d0131e2f26d959f063f1970339"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"unstable","merged_by":null,"comments":2,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"jklymak"}}