{"action":"created","comment":{"url":"https://api.github.com/repos/hadley/ggplot2/pulls/comments/76235219","id":76235219,"diff_hunk":"@@ -27,7 +27,7 @@ new_panel <- function() {\n # @param plot_data the default data frame\n # @return an updated panel object\n train_layout <- function(panel, facet, data, plot_data) {","path":"R/panel.r","position":3,"original_position":3,"commit_id":"9ef68d5d416fa2e4f9d185b305ed49d4a77147b1","original_commit_id":"9ef68d5d416fa2e4f9d185b305ed49d4a77147b1","user":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"body":"Should these become methods of `Layout`?","created_at":"2016-08-25T12:46:05Z","updated_at":"2016-08-25T12:46:05Z","html_url":"https://github.com/hadley/ggplot2/pull/1633#discussion_r76235219","pull_request_url":"https://api.github.com/repos/hadley/ggplot2/pulls/1633","_links":{"self":{"href":"https://api.github.com/repos/hadley/ggplot2/pulls/comments/76235219"},"html":{"href":"https://github.com/hadley/ggplot2/pull/1633#discussion_r76235219"},"pull_request":{"href":"https://api.github.com/repos/hadley/ggplot2/pulls/1633"}}},"pull_request":{"url":"https://api.github.com/repos/hadley/ggplot2/pulls/1633","id":69955346,"html_url":"https://github.com/hadley/ggplot2/pull/1633","diff_url":"https://github.com/hadley/ggplot2/pull/1633.diff","patch_url":"https://github.com/hadley/ggplot2/pull/1633.patch","issue_url":"https://api.github.com/repos/hadley/ggplot2/issues/1633","number":1633,"state":"open","locked":false,"title":"facets to ggproto","user":{"login":"thomasp85","id":1775316,"avatar_url":"https://avatars.githubusercontent.com/u/1775316?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasp85","html_url":"https://github.com/thomasp85","followers_url":"https://api.github.com/users/thomasp85/followers","following_url":"https://api.github.com/users/thomasp85/following{/other_user}","gists_url":"https://api.github.com/users/thomasp85/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasp85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasp85/subscriptions","organizations_url":"https://api.github.com/users/thomasp85/orgs","repos_url":"https://api.github.com/users/thomasp85/repos","events_url":"https://api.github.com/users/thomasp85/events{/privacy}","received_events_url":"https://api.github.com/users/thomasp85/received_events","type":"User","site_admin":false},"body":"@hadley \r\n\r\nThis PR is currently empty, but opened now to make a venue for discussing implementation etc.\r\n\r\nMy goal, besides streamlining ggplot2 OOP usage, is to make facets extensible by third parties in the same way as scales, geoms, etc. are now. For this to work the facet class need to be quite powerful in terms of which responsibilities it has, so I want to check with you before I begin working on it.\r\n\r\nAs I see it the facet class has the following responsibilities:\r\n\r\n1. Get data and return modified data with PANEL column\r\n2. Potentially set range of position scales\r\n3. Get a gList of layers for each panel and lay them out in a gtable\r\n4. Decorate around the facets (both axes, facet headings, etc)\r\n\r\nIn the end this means that the facet class takes full responsibility of all drawing within the plotting area (title, legends, margins, subtitles, etc should be handled elsewhere)\r\n\r\nMind you, this is before I’ve looked deeply into how facets are currently implemented. There might be additional responsibilities that appears…\r\n\r\nHow do you feel about the above?","created_at":"2016-05-13T07:46:28Z","updated_at":"2016-08-25T12:46:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1271d4da92389c4bdf59ebf6144ac9b0ac405c9e","assignee":{"login":"thomasp85","id":1775316,"avatar_url":"https://avatars.githubusercontent.com/u/1775316?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasp85","html_url":"https://github.com/thomasp85","followers_url":"https://api.github.com/users/thomasp85/followers","following_url":"https://api.github.com/users/thomasp85/following{/other_user}","gists_url":"https://api.github.com/users/thomasp85/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasp85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasp85/subscriptions","organizations_url":"https://api.github.com/users/thomasp85/orgs","repos_url":"https://api.github.com/users/thomasp85/repos","events_url":"https://api.github.com/users/thomasp85/events{/privacy}","received_events_url":"https://api.github.com/users/thomasp85/received_events","type":"User","site_admin":false},"assignees":[{"login":"thomasp85","id":1775316,"avatar_url":"https://avatars.githubusercontent.com/u/1775316?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasp85","html_url":"https://github.com/thomasp85","followers_url":"https://api.github.com/users/thomasp85/followers","following_url":"https://api.github.com/users/thomasp85/following{/other_user}","gists_url":"https://api.github.com/users/thomasp85/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasp85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasp85/subscriptions","organizations_url":"https://api.github.com/users/thomasp85/orgs","repos_url":"https://api.github.com/users/thomasp85/repos","events_url":"https://api.github.com/users/thomasp85/events{/privacy}","received_events_url":"https://api.github.com/users/thomasp85/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/hadley/ggplot2/milestones/15","html_url":"https://github.com/hadley/ggplot2/milestones/v2.2.0","labels_url":"https://api.github.com/repos/hadley/ggplot2/milestones/15/labels","id":1909550,"number":15,"title":"v2.2.0","description":"","creator":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":17,"state":"open","created_at":"2016-07-28T13:50:42Z","updated_at":"2016-08-24T13:19:31Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/hadley/ggplot2/pulls/1633/commits","review_comments_url":"https://api.github.com/repos/hadley/ggplot2/pulls/1633/comments","review_comment_url":"https://api.github.com/repos/hadley/ggplot2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hadley/ggplot2/issues/1633/comments","statuses_url":"https://api.github.com/repos/hadley/ggplot2/statuses/9ef68d5d416fa2e4f9d185b305ed49d4a77147b1","head":{"label":"thomasp85:ggproto-facets","ref":"ggproto-facets","sha":"9ef68d5d416fa2e4f9d185b305ed49d4a77147b1","user":{"login":"thomasp85","id":1775316,"avatar_url":"https://avatars.githubusercontent.com/u/1775316?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasp85","html_url":"https://github.com/thomasp85","followers_url":"https://api.github.com/users/thomasp85/followers","following_url":"https://api.github.com/users/thomasp85/following{/other_user}","gists_url":"https://api.github.com/users/thomasp85/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasp85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasp85/subscriptions","organizations_url":"https://api.github.com/users/thomasp85/orgs","repos_url":"https://api.github.com/users/thomasp85/repos","events_url":"https://api.github.com/users/thomasp85/events{/privacy}","received_events_url":"https://api.github.com/users/thomasp85/received_events","type":"User","site_admin":false},"repo":{"id":49459917,"name":"ggplot2","full_name":"thomasp85/ggplot2","owner":{"login":"thomasp85","id":1775316,"avatar_url":"https://avatars.githubusercontent.com/u/1775316?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasp85","html_url":"https://github.com/thomasp85","followers_url":"https://api.github.com/users/thomasp85/followers","following_url":"https://api.github.com/users/thomasp85/following{/other_user}","gists_url":"https://api.github.com/users/thomasp85/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasp85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasp85/subscriptions","organizations_url":"https://api.github.com/users/thomasp85/orgs","repos_url":"https://api.github.com/users/thomasp85/repos","events_url":"https://api.github.com/users/thomasp85/events{/privacy}","received_events_url":"https://api.github.com/users/thomasp85/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thomasp85/ggplot2","description":"An implementation of the Grammar of Graphics in R","fork":true,"url":"https://api.github.com/repos/thomasp85/ggplot2","forks_url":"https://api.github.com/repos/thomasp85/ggplot2/forks","keys_url":"https://api.github.com/repos/thomasp85/ggplot2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thomasp85/ggplot2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thomasp85/ggplot2/teams","hooks_url":"https://api.github.com/repos/thomasp85/ggplot2/hooks","issue_events_url":"https://api.github.com/repos/thomasp85/ggplot2/issues/events{/number}","events_url":"https://api.github.com/repos/thomasp85/ggplot2/events","assignees_url":"https://api.github.com/repos/thomasp85/ggplot2/assignees{/user}","branches_url":"https://api.github.com/repos/thomasp85/ggplot2/branches{/branch}","tags_url":"https://api.github.com/repos/thomasp85/ggplot2/tags","blobs_url":"https://api.github.com/repos/thomasp85/ggplot2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thomasp85/ggplot2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thomasp85/ggplot2/git/refs{/sha}","trees_url":"https://api.github.com/repos/thomasp85/ggplot2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thomasp85/ggplot2/statuses/{sha}","languages_url":"https://api.github.com/repos/thomasp85/ggplot2/languages","stargazers_url":"https://api.github.com/repos/thomasp85/ggplot2/stargazers","contributors_url":"https://api.github.com/repos/thomasp85/ggplot2/contributors","subscribers_url":"https://api.github.com/repos/thomasp85/ggplot2/subscribers","subscription_url":"https://api.github.com/repos/thomasp85/ggplot2/subscription","commits_url":"https://api.github.com/repos/thomasp85/ggplot2/commits{/sha}","git_commits_url":"https://api.github.com/repos/thomasp85/ggplot2/git/commits{/sha}","comments_url":"https://api.github.com/repos/thomasp85/ggplot2/comments{/number}","issue_comment_url":"https://api.github.com/repos/thomasp85/ggplot2/issues/comments{/number}","contents_url":"https://api.github.com/repos/thomasp85/ggplot2/contents/{+path}","compare_url":"https://api.github.com/repos/thomasp85/ggplot2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thomasp85/ggplot2/merges","archive_url":"https://api.github.com/repos/thomasp85/ggplot2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thomasp85/ggplot2/downloads","issues_url":"https://api.github.com/repos/thomasp85/ggplot2/issues{/number}","pulls_url":"https://api.github.com/repos/thomasp85/ggplot2/pulls{/number}","milestones_url":"https://api.github.com/repos/thomasp85/ggplot2/milestones{/number}","notifications_url":"https://api.github.com/repos/thomasp85/ggplot2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thomasp85/ggplot2/labels{/name}","releases_url":"https://api.github.com/repos/thomasp85/ggplot2/releases{/id}","deployments_url":"https://api.github.com/repos/thomasp85/ggplot2/deployments","created_at":"2016-01-11T23:00:37Z","updated_at":"2016-01-11T23:00:38Z","pushed_at":"2016-08-25T11:12:30Z","git_url":"git://github.com/thomasp85/ggplot2.git","ssh_url":"git@github.com:thomasp85/ggplot2.git","clone_url":"https://github.com/thomasp85/ggplot2.git","svn_url":"https://github.com/thomasp85/ggplot2","homepage":"http://ggplot2.org","size":27793,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"hadley:master","ref":"master","sha":"c8086c347f095f7c1b218b68c9f087033a0e5859","user":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"repo":{"id":19438,"name":"ggplot2","full_name":"hadley/ggplot2","owner":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hadley/ggplot2","description":"An implementation of the Grammar of Graphics in R","fork":false,"url":"https://api.github.com/repos/hadley/ggplot2","forks_url":"https://api.github.com/repos/hadley/ggplot2/forks","keys_url":"https://api.github.com/repos/hadley/ggplot2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hadley/ggplot2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hadley/ggplot2/teams","hooks_url":"https://api.github.com/repos/hadley/ggplot2/hooks","issue_events_url":"https://api.github.com/repos/hadley/ggplot2/issues/events{/number}","events_url":"https://api.github.com/repos/hadley/ggplot2/events","assignees_url":"https://api.github.com/repos/hadley/ggplot2/assignees{/user}","branches_url":"https://api.github.com/repos/hadley/ggplot2/branches{/branch}","tags_url":"https://api.github.com/repos/hadley/ggplot2/tags","blobs_url":"https://api.github.com/repos/hadley/ggplot2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hadley/ggplot2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hadley/ggplot2/git/refs{/sha}","trees_url":"https://api.github.com/repos/hadley/ggplot2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hadley/ggplot2/statuses/{sha}","languages_url":"https://api.github.com/repos/hadley/ggplot2/languages","stargazers_url":"https://api.github.com/repos/hadley/ggplot2/stargazers","contributors_url":"https://api.github.com/repos/hadley/ggplot2/contributors","subscribers_url":"https://api.github.com/repos/hadley/ggplot2/subscribers","subscription_url":"https://api.github.com/repos/hadley/ggplot2/subscription","commits_url":"https://api.github.com/repos/hadley/ggplot2/commits{/sha}","git_commits_url":"https://api.github.com/repos/hadley/ggplot2/git/commits{/sha}","comments_url":"https://api.github.com/repos/hadley/ggplot2/comments{/number}","issue_comment_url":"https://api.github.com/repos/hadley/ggplot2/issues/comments{/number}","contents_url":"https://api.github.com/repos/hadley/ggplot2/contents/{+path}","compare_url":"https://api.github.com/repos/hadley/ggplot2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hadley/ggplot2/merges","archive_url":"https://api.github.com/repos/hadley/ggplot2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hadley/ggplot2/downloads","issues_url":"https://api.github.com/repos/hadley/ggplot2/issues{/number}","pulls_url":"https://api.github.com/repos/hadley/ggplot2/pulls{/number}","milestones_url":"https://api.github.com/repos/hadley/ggplot2/milestones{/number}","notifications_url":"https://api.github.com/repos/hadley/ggplot2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hadley/ggplot2/labels{/name}","releases_url":"https://api.github.com/repos/hadley/ggplot2/releases{/id}","deployments_url":"https://api.github.com/repos/hadley/ggplot2/deployments","created_at":"2008-05-25T01:21:32Z","updated_at":"2016-08-25T11:44:00Z","pushed_at":"2016-08-25T11:12:30Z","git_url":"git://github.com/hadley/ggplot2.git","ssh_url":"git@github.com:hadley/ggplot2.git","clone_url":"https://github.com/hadley/ggplot2.git","svn_url":"https://github.com/hadley/ggplot2","homepage":"http://ggplot2.org","size":29993,"stargazers_count":1975,"watchers_count":1975,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":751,"mirror_url":null,"open_issues_count":52,"forks":751,"open_issues":52,"watchers":1975,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hadley/ggplot2/pulls/1633"},"html":{"href":"https://github.com/hadley/ggplot2/pull/1633"},"issue":{"href":"https://api.github.com/repos/hadley/ggplot2/issues/1633"},"comments":{"href":"https://api.github.com/repos/hadley/ggplot2/issues/1633/comments"},"review_comments":{"href":"https://api.github.com/repos/hadley/ggplot2/pulls/1633/comments"},"review_comment":{"href":"https://api.github.com/repos/hadley/ggplot2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hadley/ggplot2/pulls/1633/commits"},"statuses":{"href":"https://api.github.com/repos/hadley/ggplot2/statuses/9ef68d5d416fa2e4f9d185b305ed49d4a77147b1"}}}}
{"actor":{"display_login":"hadley"}}