{"action":"created","comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments/83554619","pull_request_review_id":4391934,"id":83554619,"diff_hunk":"@@ -0,0 +1,181 @@\n+=============================================\n+ MEP 28: Remove Complexity from Axes.boxplot\n+=============================================\n+\n+.. contents::\n+   :local:\n+\n+\n+This MEP template is a guideline of the sections that a MEP should\n+contain.  Extra sections may be added if appropriate, and unnecessary\n+sections may be noted as such.\n+\n+Status\n+======\n+\n+MEPs go through a number of phases in their lifetime:\n+\n+..\n+..  - **Discussion**\n+..\n+.. - **Progress**: Consensus was reached on the mailing list and\n+..  implementation work has begun.\n+..\n+.. - **Completed**: The implementation has been merged into master.\n+..\n+.. - **Superseded**: This MEP has been abandoned in favor of another\n+..   approach.\n+\n+Branches and Pull requests\n+==========================\n+\n+All development branches containing work on this MEP should be linked to from here.\n+\n+All pull requests submitted relating to this MEP should be linked to\n+from here.  (A MEP does not need to be implemented in a single pull\n+request if it makes sense to implement it in discrete phases).\n+\n+Abstract\n+========\n+\n+Over the past few releases, the ``Axes.boxplot`` method as grown in\n+complexity to support fully customizable artist styline and statistics\n+computation. This lead to ``Axes.boxplot`` being split off into multiple\n+parts. The statistics needed to draw a boxplot are computed in\n+``cbook.boxplot_stats``, while the actual artists are drawn by ``Axes.bxp``.\n+The original method, ``Axes.boxplot`` remains as the most public API that\n+handles passing the user-supplied data to ``cbook.boxplot_stats``, feeding\n+the results to ``Axes.bxp``, and pre-processing style information for\n+each facet of the boxplot plots.\n+\n+This MEP will outline a path forward to roll-back the added complexity\n+and simplify the API while maintaining reasonable backwards\n+compatibility.\n+\n+Detailed description\n+====================\n+\n+Currently, the ``Axes.boxplot`` method accepts parameters that allow the\n+users to specify medians and confidence intervals for each box that\n+will be drawn in the plot. These were provided so that avdanced users\n+could provide statistics computed in a different fashion that the simple\n+method provided by matplotlob. However, handling this input requires\n+complex logic to make sure that the forms of the data structure match what\n+needs to be drawn. At the moment, that logic contain 9 separate if/else\n+statements nested up to 5 levels deep with a for loop, and raise up to 2 errors.\n+These parameters were added prior to the creation of the ``Axes.bxp`` method,\n+which draws boxplots from a list of dictionaries containing the relevant\n+statistics. Matplotlib also provides a function that computes these\n+statistics via ``cbook.boxplot_stats``. Note that advanced users can now\n+either a) write their own function to compute the stats required by\n+``Axes.bxp``, or b) modify the output returned by ``cbook.boxplots_stats``\n+to fully customize the position of the artists of the plots. With this\n+flexibility, the parameters to manually specify only the medians and their\n+confidences intervals remain for backwards compatibility.\n+\n+Around the same time that the two roles of ``Axes.bxplot`` were split into\n+``cbook.boxplot_stats`` for computation and ``Axes.bxp`` for drawing, both\n+``Axes.boxplot`` and ``Axes.bxp`` were written to accept parameters that\n+individually toggle the drawing of all components of the boxplots, and\n+parameters that individually configure the style of those artists. However,\n+to maintain backwards compatibility, the ``sym`` parameter (previously used\n+to specify the symbol of the fliers) was retained. This parameter itself\n+requires fairly complex logic to reconcile the ``sym`` parameters with the\n+newer ``flierprops`` parameter at the default style specified by ``matplotlibrc``.\n+\n+This MEP seeks to dramatically simplify the creation of boxplots for\n+novice and advanced users alike. Importantly, the changes proposed here\n+will also be available to downstream packages like seaborn, as seaborn\n+smartly allows users to pass arbitrary dictionaries of parameters through\n+the seaborn API to the underlying matplotlib functions.\n+\n+This will be achieved in the following way:\n+\n+  1. ``cbook.boxplot_stats`` will be modified to allow pre- and post-\n+     computation tranformation functions to be passed in (e.g., ``np.log``\n+     and ``np.exp`` for lognormally distributed data)\n+  2. ``Axes.boxplot`` will be modified to also accept and naïvely pass them\n+     to ``cbook.boxplots_stats`` (Alt: pass the stat function and a dict\n+     of its optional parameters).\n+  3. Outdated parameters from ``Axes.boxplot`` will be deprecated and\n+     later removed.\n+\n+Implementation\n+==============\n+\n+Passing transform functions to ``cbook.boxplots_stats``\n+-------------------------------------------------------\n+\n+This MEP proposes that two parameters (e.g., ``transform_in`` and\n+``transform_out`` be added to the cookbook function that computes the\n+statistics for the boxplot function. These will be optional keyword-only\n+arguments and can easily be set to ``lambda x: x`` as a no-op when omitted\n+by the user. The ``transform_in`` function will be applied to the data\n+as the ``boxplot_stats`` function loops through each subset of the data\n+pass to it. After the list of statistics dictionaries are computed the","path":"doc/devel/MEP/MEP28.rst","position":115,"original_position":115,"commit_id":"fe54d52ea252c8b90b124939b49700b51555290c","original_commit_id":"fe54d52ea252c8b90b124939b49700b51555290c","user":{"login":"story645","id":1300499,"avatar_url":"https://avatars.githubusercontent.com/u/1300499?v=3","gravatar_id":"","url":"https://api.github.com/users/story645","html_url":"https://github.com/story645","followers_url":"https://api.github.com/users/story645/followers","following_url":"https://api.github.com/users/story645/following{/other_user}","gists_url":"https://api.github.com/users/story645/gists{/gist_id}","starred_url":"https://api.github.com/users/story645/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/story645/subscriptions","organizations_url":"https://api.github.com/users/story645/orgs","repos_url":"https://api.github.com/users/story645/repos","events_url":"https://api.github.com/users/story645/events{/privacy}","received_events_url":"https://api.github.com/users/story645/received_events","type":"User","site_admin":false},"body":"minor: passed not pass","created_at":"2016-10-16T16:27:10Z","updated_at":"2016-10-16T16:27:10Z","html_url":"https://github.com/matplotlib/matplotlib/pull/7282#discussion_r83554619","pull_request_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/7282","_links":{"self":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments/83554619"},"html":{"href":"https://github.com/matplotlib/matplotlib/pull/7282#discussion_r83554619"},"pull_request":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/7282"}}},"pull_request":{"url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/7282","id":89529472,"html_url":"https://github.com/matplotlib/matplotlib/pull/7282","diff_url":"https://github.com/matplotlib/matplotlib/pull/7282.diff","patch_url":"https://github.com/matplotlib/matplotlib/pull/7282.patch","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7282","number":7282,"state":"open","locked":false,"title":"WIP: first cut at boxplot MEP","user":{"login":"phobson","id":1163939,"avatar_url":"https://avatars.githubusercontent.com/u/1163939?v=3","gravatar_id":"","url":"https://api.github.com/users/phobson","html_url":"https://github.com/phobson","followers_url":"https://api.github.com/users/phobson/followers","following_url":"https://api.github.com/users/phobson/following{/other_user}","gists_url":"https://api.github.com/users/phobson/gists{/gist_id}","starred_url":"https://api.github.com/users/phobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phobson/subscriptions","organizations_url":"https://api.github.com/users/phobson/orgs","repos_url":"https://api.github.com/users/phobson/repos","events_url":"https://api.github.com/users/phobson/events{/privacy}","received_events_url":"https://api.github.com/users/phobson/received_events","type":"User","site_admin":false},"body":"This a MEP for a series of small changes that will\r\n\r\n  1. Remove much of the the complexity (implementation, and API) from `cbook.boxplot_stats`, `Axes.boxplot`, and `Axes.bxp`\r\n  2. Provide complete control over how the statistics are computed to outside libraries like `seaborn` with no action required on their part\r\n  3. Remove some old parameter in a backwards incompatible fashion for a more consistent API.","created_at":"2016-10-16T15:45:24Z","updated_at":"2016-10-16T16:40:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3abd7900806334bd7b0687bf744297d7ef0a27a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/7282/commits","review_comments_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/7282/comments","review_comment_url":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7282/comments","statuses_url":"https://api.github.com/repos/matplotlib/matplotlib/statuses/fe54d52ea252c8b90b124939b49700b51555290c","head":{"label":"phobson:MEP-bxp","ref":"MEP-bxp","sha":"fe54d52ea252c8b90b124939b49700b51555290c","user":{"login":"phobson","id":1163939,"avatar_url":"https://avatars.githubusercontent.com/u/1163939?v=3","gravatar_id":"","url":"https://api.github.com/users/phobson","html_url":"https://github.com/phobson","followers_url":"https://api.github.com/users/phobson/followers","following_url":"https://api.github.com/users/phobson/following{/other_user}","gists_url":"https://api.github.com/users/phobson/gists{/gist_id}","starred_url":"https://api.github.com/users/phobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phobson/subscriptions","organizations_url":"https://api.github.com/users/phobson/orgs","repos_url":"https://api.github.com/users/phobson/repos","events_url":"https://api.github.com/users/phobson/events{/privacy}","received_events_url":"https://api.github.com/users/phobson/received_events","type":"User","site_admin":false},"repo":{"id":4459660,"name":"matplotlib","full_name":"phobson/matplotlib","owner":{"login":"phobson","id":1163939,"avatar_url":"https://avatars.githubusercontent.com/u/1163939?v=3","gravatar_id":"","url":"https://api.github.com/users/phobson","html_url":"https://github.com/phobson","followers_url":"https://api.github.com/users/phobson/followers","following_url":"https://api.github.com/users/phobson/following{/other_user}","gists_url":"https://api.github.com/users/phobson/gists{/gist_id}","starred_url":"https://api.github.com/users/phobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phobson/subscriptions","organizations_url":"https://api.github.com/users/phobson/orgs","repos_url":"https://api.github.com/users/phobson/repos","events_url":"https://api.github.com/users/phobson/events{/privacy}","received_events_url":"https://api.github.com/users/phobson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phobson/matplotlib","description":null,"fork":true,"url":"https://api.github.com/repos/phobson/matplotlib","forks_url":"https://api.github.com/repos/phobson/matplotlib/forks","keys_url":"https://api.github.com/repos/phobson/matplotlib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phobson/matplotlib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phobson/matplotlib/teams","hooks_url":"https://api.github.com/repos/phobson/matplotlib/hooks","issue_events_url":"https://api.github.com/repos/phobson/matplotlib/issues/events{/number}","events_url":"https://api.github.com/repos/phobson/matplotlib/events","assignees_url":"https://api.github.com/repos/phobson/matplotlib/assignees{/user}","branches_url":"https://api.github.com/repos/phobson/matplotlib/branches{/branch}","tags_url":"https://api.github.com/repos/phobson/matplotlib/tags","blobs_url":"https://api.github.com/repos/phobson/matplotlib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phobson/matplotlib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phobson/matplotlib/git/refs{/sha}","trees_url":"https://api.github.com/repos/phobson/matplotlib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phobson/matplotlib/statuses/{sha}","languages_url":"https://api.github.com/repos/phobson/matplotlib/languages","stargazers_url":"https://api.github.com/repos/phobson/matplotlib/stargazers","contributors_url":"https://api.github.com/repos/phobson/matplotlib/contributors","subscribers_url":"https://api.github.com/repos/phobson/matplotlib/subscribers","subscription_url":"https://api.github.com/repos/phobson/matplotlib/subscription","commits_url":"https://api.github.com/repos/phobson/matplotlib/commits{/sha}","git_commits_url":"https://api.github.com/repos/phobson/matplotlib/git/commits{/sha}","comments_url":"https://api.github.com/repos/phobson/matplotlib/comments{/number}","issue_comment_url":"https://api.github.com/repos/phobson/matplotlib/issues/comments{/number}","contents_url":"https://api.github.com/repos/phobson/matplotlib/contents/{+path}","compare_url":"https://api.github.com/repos/phobson/matplotlib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phobson/matplotlib/merges","archive_url":"https://api.github.com/repos/phobson/matplotlib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phobson/matplotlib/downloads","issues_url":"https://api.github.com/repos/phobson/matplotlib/issues{/number}","pulls_url":"https://api.github.com/repos/phobson/matplotlib/pulls{/number}","milestones_url":"https://api.github.com/repos/phobson/matplotlib/milestones{/number}","notifications_url":"https://api.github.com/repos/phobson/matplotlib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phobson/matplotlib/labels{/name}","releases_url":"https://api.github.com/repos/phobson/matplotlib/releases{/id}","deployments_url":"https://api.github.com/repos/phobson/matplotlib/deployments","created_at":"2012-05-27T03:36:20Z","updated_at":"2015-03-30T05:45:25Z","pushed_at":"2016-10-16T16:19:55Z","git_url":"git://github.com/phobson/matplotlib.git","ssh_url":"git@github.com:phobson/matplotlib.git","clone_url":"https://github.com/phobson/matplotlib.git","svn_url":"https://github.com/phobson/matplotlib","homepage":"","size":288612,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"matplotlib:master","ref":"master","sha":"389a7edf8ba3f3decf0f8ecf9ca4f81b33e82f4b","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-10-16T14:22:19Z","pushed_at":"2016-10-16T16:17:59Z","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":400409,"stargazers_count":4234,"watchers_count":4234,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2079,"mirror_url":null,"open_issues_count":1024,"forks":2079,"open_issues":1024,"watchers":4234,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/7282"},"html":{"href":"https://github.com/matplotlib/matplotlib/pull/7282"},"issue":{"href":"https://api.github.com/repos/matplotlib/matplotlib/issues/7282"},"comments":{"href":"https://api.github.com/repos/matplotlib/matplotlib/issues/7282/comments"},"review_comments":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/7282/comments"},"review_comment":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matplotlib/matplotlib/pulls/7282/commits"},"statuses":{"href":"https://api.github.com/repos/matplotlib/matplotlib/statuses/fe54d52ea252c8b90b124939b49700b51555290c"}}}}
{"actor":{"display_login":"story645"}}