{"action":"opened","number":6252,"pull_request":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/6252","id":64727436,"html_url":"https://github.com/matplotlib/matplotlib/pull/6252","diff_url":"https://github.com/matplotlib/matplotlib/pull/6252.diff","patch_url":"https://github.com/matplotlib/matplotlib/pull/6252.patch","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6252","number":6252,"state":"open","locked":false,"title":"WIP DO NOT MERGE Implements #4489","user":{"login":"nansonzheng","id":14435972,"avatar_url":"https://avatars.githubusercontent.com/u/14435972?v=3","gravatar_id":"","url":"https://api.github.com/users/nansonzheng","html_url":"https://github.com/nansonzheng","followers_url":"https://api.github.com/users/nansonzheng/followers","following_url":"https://api.github.com/users/nansonzheng/following{/other_user}","gists_url":"https://api.github.com/users/nansonzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/nansonzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nansonzheng/subscriptions","organizations_url":"https://api.github.com/users/nansonzheng/orgs","repos_url":"https://api.github.com/users/nansonzheng/repos","events_url":"https://api.github.com/users/nansonzheng/events{/privacy}","received_events_url":"https://api.github.com/users/nansonzheng/received_events","type":"User","site_admin":false},"body":"This is work in progress to implement auto-placement of annotations, as mentioned in issue #4489. We're trying to migrate legend.py's find best position algorithm, and are unsure what to do for our next step. So far, we've:\r\n\r\n- Copied _find_best_position, _auto_legend_data and _get_anchored_bbox from legend.py\r\n- Added a new instance variable of the axes for use in _find_best_position\r\n- Used self.parent.bbox for _get_anchored_bbox\r\n- Used Text.get_window_extent to get the bbox of the annotation for its width and height (Or so I assumed)\r\n- Removed self.borderaxespad from _get_anchored_bbox's method body, since it doesn't exist and I couldn't find a suitable replacement (Not in this commit)\r\n\r\nCurrent issues that we're having/foreseeing:\r\n- Is this the correct way to get an annotation's bbox? Is there a more correct (or more appropriate for this situation) way to get the bbox?\r\n- Are there any problems with removing borderaxespad from _get_anchored_bbox?\r\n- _find_best_position appears to give display (pixel) coordinates for the best determined position. In which method should it be called, and which method should be used to update its position?\r\n","created_at":"2016-03-31T02:47:08Z","updated_at":"2016-03-31T02:47:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/6252/commits","review_comments_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/6252/comments","review_comment_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/6252/comments","statuses_url":"https://api.github.com/repos/matplotlib/matplotlib/statuses/3036c33ff5d2cefcef4c5930eaff169c84d215f2","head":{"label":"nansonzheng:fixes-4489","ref":"fixes-4489","sha":"3036c33ff5d2cefcef4c5930eaff169c84d215f2","user":{"login":"nansonzheng","id":14435972,"avatar_url":"https://avatars.githubusercontent.com/u/14435972?v=3","gravatar_id":"","url":"https://api.github.com/users/nansonzheng","html_url":"https://github.com/nansonzheng","followers_url":"https://api.github.com/users/nansonzheng/followers","following_url":"https://api.github.com/users/nansonzheng/following{/other_user}","gists_url":"https://api.github.com/users/nansonzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/nansonzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nansonzheng/subscriptions","organizations_url":"https://api.github.com/users/nansonzheng/orgs","repos_url":"https://api.github.com/users/nansonzheng/repos","events_url":"https://api.github.com/users/nansonzheng/events{/privacy}","received_events_url":"https://api.github.com/users/nansonzheng/received_events","type":"User","site_admin":false},"repo":{"id":53207666,"name":"matplotlib","full_name":"nansonzheng/matplotlib","owner":{"login":"nansonzheng","id":14435972,"avatar_url":"https://avatars.githubusercontent.com/u/14435972?v=3","gravatar_id":"","url":"https://api.github.com/users/nansonzheng","html_url":"https://github.com/nansonzheng","followers_url":"https://api.github.com/users/nansonzheng/followers","following_url":"https://api.github.com/users/nansonzheng/following{/other_user}","gists_url":"https://api.github.com/users/nansonzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/nansonzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nansonzheng/subscriptions","organizations_url":"https://api.github.com/users/nansonzheng/orgs","repos_url":"https://api.github.com/users/nansonzheng/repos","events_url":"https://api.github.com/users/nansonzheng/events{/privacy}","received_events_url":"https://api.github.com/users/nansonzheng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nansonzheng/matplotlib","description":"matplotlib: plotting with Python","fork":true,"url":"https://api.github.com/repos/nansonzheng/matplotlib","forks_url":"https://api.github.com/repos/nansonzheng/matplotlib/forks","keys_url":"https://api.github.com/repos/nansonzheng/matplotlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nansonzheng/matplotlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nansonzheng/matplotlib/teams","hooks_url":"https://api.github.com/repos/nansonzheng/matplotlib/hooks","issue_events_url":"https://api.github.com/repos/nansonzheng/matplotlib/issues/events{/number}","events_url":"https://api.github.com/repos/nansonzheng/matplotlib/events","assignees_url":"https://api.github.com/repos/nansonzheng/matplotlib/assignees{/user}","branches_url":"https://api.github.com/repos/nansonzheng/matplotlib/branches{/branch}","tags_url":"https://api.github.com/repos/nansonzheng/matplotlib/tags","blobs_url":"https://api.github.com/repos/nansonzheng/matplotlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nansonzheng/matplotlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nansonzheng/matplotlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/nansonzheng/matplotlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nansonzheng/matplotlib/statuses/{sha}","languages_url":"https://api.github.com/repos/nansonzheng/matplotlib/languages","stargazers_url":"https://api.github.com/repos/nansonzheng/matplotlib/stargazers","contributors_url":"https://api.github.com/repos/nansonzheng/matplotlib/contributors","subscribers_url":"https://api.github.com/repos/nansonzheng/matplotlib/subscribers","subscription_url":"https://api.github.com/repos/nansonzheng/matplotlib/subscription","commits_url":"https://api.github.com/repos/nansonzheng/matplotlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/nansonzheng/matplotlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/nansonzheng/matplotlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/nansonzheng/matplotlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/nansonzheng/matplotlib/contents/{+path}","compare_url":"https://api.github.com/repos/nansonzheng/matplotlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nansonzheng/matplotlib/merges","archive_url":"https://api.github.com/repos/nansonzheng/matplotlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nansonzheng/matplotlib/downloads","issues_url":"https://api.github.com/repos/nansonzheng/matplotlib/issues{/number}","pulls_url":"https://api.github.com/repos/nansonzheng/matplotlib/pulls{/number}","milestones_url":"https://api.github.com/repos/nansonzheng/matplotlib/milestones{/number}","notifications_url":"https://api.github.com/repos/nansonzheng/matplotlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nansonzheng/matplotlib/labels{/name}","releases_url":"https://api.github.com/repos/nansonzheng/matplotlib/releases{/id}","deployments_url":"https://api.github.com/repos/nansonzheng/matplotlib/deployments","created_at":"2016-03-05T15:19:05Z","updated_at":"2016-03-05T15:19:15Z","pushed_at":"2016-03-31T01:11:26Z","git_url":"git://github.com/nansonzheng/matplotlib.git","ssh_url":"git@github.com:nansonzheng/matplotlib.git","clone_url":"https://github.com/nansonzheng/matplotlib.git","svn_url":"https://github.com/nansonzheng/matplotlib","homepage":"http://matplotlib.org/","size":277140,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"matplotlib:master","ref":"master","sha":"0ddf0bc33f9752ffc9d0c2dab2dd22d9f0e2ad95","user":{"login":"matplotlib","id":215947,"avatar_url":"https://avatars.githubusercontent.com/u/215947?v=3","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://avatars.githubusercontent.com/u/215947?v=3","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":"2016-03-30T22:47:52Z","pushed_at":"2016-03-30T22:30:42Z","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":390291,"stargazers_count":3445,"watchers_count":3445,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1763,"mirror_url":null,"open_issues_count":852,"forks":1763,"open_issues":852,"watchers":3445,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/6252"},"html":{"href":"https://github.com/matplotlib/matplotlib/pull/6252"},"issue":{"href":"https://api.github.com/repos/matplotlib/matplotlib/issues/6252"},"comments":{"href":"https://api.github.com/repos/matplotlib/matplotlib/issues/6252/comments"},"review_comments":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/6252/comments"},"review_comment":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/6252/commits"},"statuses":{"href":"https://api.github.com/repos/matplotlib/matplotlib/statuses/3036c33ff5d2cefcef4c5930eaff169c84d215f2"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":195,"deletions":2,"changed_files":2}}