{"action":"created","comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments/40495593","id":40495593,"diff_hunk":"@@ -1001,6 +1002,142 @@ def add_subplot(self, *args, **kwargs):\n         self.stale = True\n         return a\n \n+    def add_subplots(self, nrows=1, ncols=1, sharex=False, sharey=False,\n+                     squeeze=True, subplot_kw=None, gridspec_kw=None):\n+        \"\"\"\n+        Add a set of subplots to this figure.\n+\n+        Keyword arguments:\n+\n+        *nrows* : int\n+            Number of rows of the subplot grid.  Defaults to 1.\n+\n+        *ncols* : int\n+            Number of columns of the subplot grid.  Defaults to 1.\n+\n+        *sharex* : string or bool\n+            If *True*, the X axis will be shared amongst all subplots.  If\n+            *True* and you have multiple rows, the x tick labels on all but\n+            the last row of plots will have visible set to *False*\n+            If a string must be one of \"row\", \"col\", \"all\", or \"none\".\n+            \"all\" has the same effect as *True*, \"none\" has the same effect\n+            as *False*.\n+            If \"row\", each subplot row will share a X axis.\n+            If \"col\", each subplot column will share a X axis and the x tick\n+            labels on all but the last row will have visible set to *False*.\n+\n+        *sharey* : string or bool\n+            If *True*, the Y axis will be shared amongst all subplots. If\n+            *True* and you have multiple columns, the y tick labels on all but\n+            the first column of plots will have visible set to *False*\n+            If a string must be one of \"row\", \"col\", \"all\", or \"none\".\n+            \"all\" has the same effect as *True*, \"none\" has the same effect\n+            as *False*.\n+            If \"row\", each subplot row will share a Y axis and the y tick\n+            labels on all but the first column will have visible set to *False*.\n+            If \"col\", each subplot column will share a Y axis.\n+\n+        *squeeze* : bool\n+            If *True*, extra dimensions are squeezed out from the\n+            returned axis object:\n+\n+            - if only one subplot is constructed (nrows=ncols=1), the\n+            resulting single Axis object is returned as a scalar.\n+\n+            - for Nx1 or 1xN subplots, the returned object is a 1-d numpy\n+            object array of Axis objects are returned as numpy 1-d\n+            arrays.\n+\n+            - for NxM subplots with N>1 and M>1 are returned as a 2d\n+            array.\n+\n+            If *False*, no squeezing at all is done: the returned axis\n+            object is always a 2-d array containing Axis instances, even if it\n+            ends up being 1x1.\n+\n+        *subplot_kw* : dict\n+            Dict with keywords passed to the\n+            :meth:`~matplotlib.figure.Figure.add_subplot` call used to\n+            create each subplots.\n+\n+        *gridspec_kw* : dict\n+            Dict with keywords passed to the\n+            :class:`~matplotlib.gridspec.GridSpec` constructor used to create\n+            the grid the subplots are placed on.\n+\n+        Returns:\n+\n+        ax : single axes object or array of axes objects\n+            The addes axes.  The dimensions of the resulting array can be\n+            controlled with the squeeze keyword, see above.\n+\n+        See the docstring of :func:`~pyplot.subplots' for examples\n+        \"\"\"\n+","path":"lib/matplotlib/figure.py","position":83,"original_position":83,"commit_id":"f197486a5843f36afa624e2a1165c4f8a9f2b0a0","original_commit_id":"f197486a5843f36afa624e2a1165c4f8a9f2b0a0","user":{"login":"anntzer","id":1322974,"avatar_url":"https://avatars.githubusercontent.com/u/1322974?v=3","gravatar_id":"","url":"https://api.github.com/users/anntzer","html_url":"https://github.com/anntzer","followers_url":"https://api.github.com/users/anntzer/followers","following_url":"https://api.github.com/users/anntzer/following{/other_user}","gists_url":"https://api.github.com/users/anntzer/gists{/gist_id}","starred_url":"https://api.github.com/users/anntzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anntzer/subscriptions","organizations_url":"https://api.github.com/users/anntzer/orgs","repos_url":"https://api.github.com/users/anntzer/repos","events_url":"https://api.github.com/users/anntzer/events{/privacy}","received_events_url":"https://api.github.com/users/anntzer/received_events","type":"User","site_admin":false},"body":"I'd rather not, IMO if you use the OO interface you know what you're doing and it's anyways easier for the caller to add a call the `clf` rather than to remove a call to `clf`.","created_at":"2015-09-26T17:00:36Z","updated_at":"2015-09-26T17:00:36Z","html_url":"https://github.com/matplotlib/matplotlib/pull/5146#discussion_r40495593","pull_request_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5146","_links":{"self":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments/40495593"},"html":{"href":"https://github.com/matplotlib/matplotlib/pull/5146#discussion_r40495593"},"pull_request":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5146"}}},"pull_request":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5146","id":46067596,"html_url":"https://github.com/matplotlib/matplotlib/pull/5146","diff_url":"https://github.com/matplotlib/matplotlib/pull/5146.diff","patch_url":"https://github.com/matplotlib/matplotlib/pull/5146.patch","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5146","number":5146,"state":"open","locked":false,"title":"Move impl. of plt.subplots to Figure.add_subplots.","user":{"login":"anntzer","id":1322974,"avatar_url":"https://avatars.githubusercontent.com/u/1322974?v=3","gravatar_id":"","url":"https://api.github.com/users/anntzer","html_url":"https://github.com/anntzer","followers_url":"https://api.github.com/users/anntzer/followers","following_url":"https://api.github.com/users/anntzer/following{/other_user}","gists_url":"https://api.github.com/users/anntzer/gists{/gist_id}","starred_url":"https://api.github.com/users/anntzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anntzer/subscriptions","organizations_url":"https://api.github.com/users/anntzer/orgs","repos_url":"https://api.github.com/users/anntzer/repos","events_url":"https://api.github.com/users/anntzer/events{/privacy}","received_events_url":"https://api.github.com/users/anntzer/received_events","type":"User","site_admin":false},"body":"Also simplify the implementation a bit.\r\n\r\ncf. #5139.","created_at":"2015-09-25T23:15:23Z","updated_at":"2015-09-26T17:00:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"adcb4cfc1ab4e6c8e0d11934c6a655607dde1edf","assignee":null,"milestone":{"url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/12","html_url":"https://github.com/matplotlib/matplotlib/milestones/proposed%20next%20point%20release%20(2.1)","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/milestones/12/labels","id":534144,"number":12,"title":"proposed next point release (2.1)","description":"Next feature release.\r\n\r\nBig ticket items:\r\n\r\n - MEP 22/27\r\n - traitlets","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":408,"closed_issues":238,"state":"open","created_at":"2014-01-13T03:21:09Z","updated_at":"2015-09-26T14:30:40Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5146/commits","review_comments_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5146/comments","review_comment_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/5146/comments","statuses_url":"https://api.github.com/repos/matplotlib/matplotlib/statuses/f197486a5843f36afa624e2a1165c4f8a9f2b0a0","head":{"label":"anntzer:figure-subplots","ref":"figure-subplots","sha":"f197486a5843f36afa624e2a1165c4f8a9f2b0a0","user":{"login":"anntzer","id":1322974,"avatar_url":"https://avatars.githubusercontent.com/u/1322974?v=3","gravatar_id":"","url":"https://api.github.com/users/anntzer","html_url":"https://github.com/anntzer","followers_url":"https://api.github.com/users/anntzer/followers","following_url":"https://api.github.com/users/anntzer/following{/other_user}","gists_url":"https://api.github.com/users/anntzer/gists{/gist_id}","starred_url":"https://api.github.com/users/anntzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anntzer/subscriptions","organizations_url":"https://api.github.com/users/anntzer/orgs","repos_url":"https://api.github.com/users/anntzer/repos","events_url":"https://api.github.com/users/anntzer/events{/privacy}","received_events_url":"https://api.github.com/users/anntzer/received_events","type":"User","site_admin":false},"repo":{"id":7439715,"name":"matplotlib","full_name":"anntzer/matplotlib","owner":{"login":"anntzer","id":1322974,"avatar_url":"https://avatars.githubusercontent.com/u/1322974?v=3","gravatar_id":"","url":"https://api.github.com/users/anntzer","html_url":"https://github.com/anntzer","followers_url":"https://api.github.com/users/anntzer/followers","following_url":"https://api.github.com/users/anntzer/following{/other_user}","gists_url":"https://api.github.com/users/anntzer/gists{/gist_id}","starred_url":"https://api.github.com/users/anntzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anntzer/subscriptions","organizations_url":"https://api.github.com/users/anntzer/orgs","repos_url":"https://api.github.com/users/anntzer/repos","events_url":"https://api.github.com/users/anntzer/events{/privacy}","received_events_url":"https://api.github.com/users/anntzer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anntzer/matplotlib","description":"","fork":true,"url":"https://api.github.com/repos/anntzer/matplotlib","forks_url":"https://api.github.com/repos/anntzer/matplotlib/forks","keys_url":"https://api.github.com/repos/anntzer/matplotlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anntzer/matplotlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anntzer/matplotlib/teams","hooks_url":"https://api.github.com/repos/anntzer/matplotlib/hooks","issue_events_url":"https://api.github.com/repos/anntzer/matplotlib/issues/events{/number}","events_url":"https://api.github.com/repos/anntzer/matplotlib/events","assignees_url":"https://api.github.com/repos/anntzer/matplotlib/assignees{/user}","branches_url":"https://api.github.com/repos/anntzer/matplotlib/branches{/branch}","tags_url":"https://api.github.com/repos/anntzer/matplotlib/tags","blobs_url":"https://api.github.com/repos/anntzer/matplotlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anntzer/matplotlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anntzer/matplotlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/anntzer/matplotlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anntzer/matplotlib/statuses/{sha}","languages_url":"https://api.github.com/repos/anntzer/matplotlib/languages","stargazers_url":"https://api.github.com/repos/anntzer/matplotlib/stargazers","contributors_url":"https://api.github.com/repos/anntzer/matplotlib/contributors","subscribers_url":"https://api.github.com/repos/anntzer/matplotlib/subscribers","subscription_url":"https://api.github.com/repos/anntzer/matplotlib/subscription","commits_url":"https://api.github.com/repos/anntzer/matplotlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/anntzer/matplotlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/anntzer/matplotlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/anntzer/matplotlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/anntzer/matplotlib/contents/{+path}","compare_url":"https://api.github.com/repos/anntzer/matplotlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anntzer/matplotlib/merges","archive_url":"https://api.github.com/repos/anntzer/matplotlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anntzer/matplotlib/downloads","issues_url":"https://api.github.com/repos/anntzer/matplotlib/issues{/number}","pulls_url":"https://api.github.com/repos/anntzer/matplotlib/pulls{/number}","milestones_url":"https://api.github.com/repos/anntzer/matplotlib/milestones{/number}","notifications_url":"https://api.github.com/repos/anntzer/matplotlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anntzer/matplotlib/labels{/name}","releases_url":"https://api.github.com/repos/anntzer/matplotlib/releases{/id}","created_at":"2013-01-04T12:08:11Z","updated_at":"2015-05-05T17:32:26Z","pushed_at":"2015-09-25T23:14:27Z","git_url":"git://github.com/anntzer/matplotlib.git","ssh_url":"git@github.com:anntzer/matplotlib.git","clone_url":"https://github.com/anntzer/matplotlib.git","svn_url":"https://github.com/anntzer/matplotlib","homepage":"","size":217122,"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":"39f01362195e239824240614033eb794a64d35bf","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}","created_at":"2011-02-19T03:17:12Z","updated_at":"2015-09-26T16:29:32Z","pushed_at":"2015-09-26T16:45:43Z","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":278130,"stargazers_count":2856,"watchers_count":2856,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1463,"mirror_url":null,"open_issues_count":656,"forks":1463,"open_issues":656,"watchers":2856,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5146"},"html":{"href":"https://github.com/matplotlib/matplotlib/pull/5146"},"issue":{"href":"https://api.github.com/repos/matplotlib/matplotlib/issues/5146"},"comments":{"href":"https://api.github.com/repos/matplotlib/matplotlib/issues/5146/comments"},"review_comments":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5146/comments"},"review_comment":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/5146/commits"},"statuses":{"href":"https://api.github.com/repos/matplotlib/matplotlib/statuses/f197486a5843f36afa624e2a1165c4f8a9f2b0a0"}}}}