<div dir="ltr">Bumping this to see if the weekend crowd has any strong feelings about the state of the boxplot API and how you'd like to see it (not) change.<div>-p</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 9:48 AM, Paul Hobson <span dir="ltr"><<a href="mailto:pmhobson@gmail.com" target="_blank">pmhobson@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello everyone,<div><br></div><div>We are soliciting feedback and comments on a new MEP (#28) proposing some high-level changes to the boxplot API has been released in *draft* form here:</div><div><br></div><div><a href="http://matplotlib.org/devdocs/devel/MEP/MEP28.html" target="_blank">http://matplotlib.org/devdocs/<wbr>devel/MEP/MEP28.html</a><br></div><div><br></div><div>The goals of the MEP are as follows:</div><div>1) Deprecate and remove seldom used*, difficult-to-use, and redundant** kwargs</div><div>2) Synchronize parameter names between `<span style="background-color:rgb(248,248,248);color:rgb(51,51,51);font-family:monaco,menlo,consolas,"courier new",monospace;font-size:0.9em;letter-spacing:0.015em">boxplot</span>` and `<span style="color:rgb(51,51,51);font-family:monaco,menlo,consolas,"courier new",monospace;font-size:11.7px;letter-spacing:0.1755px;background-color:rgb(248,248,248)">bxp</span>`<br></div><div>3a) Allow user-defined pre- and post-stat calculation data transformation functions to `<span style="color:rgb(51,51,51);font-family:monaco,menlo,consolas,"courier new",monospace;font-size:11.7px;letter-spacing:0.1755px;background-color:rgb(248,248,248)">boxplot</span>`</div><div>OR</div><div>3b) Allow users to pass their own statistics function (with parameters) to `<span style="color:rgb(51,51,51);font-family:monaco,menlo,consolas,"courier new",monospace;font-size:11.7px;letter-spacing:0.1755px;background-color:rgb(248,248,248)">boxplot</span>`</div><div><br></div><div>The functionality of #3a/3b is currently available to users if they go through the `<span style="color:rgb(51,51,51);font-family:monaco,menlo,consolas,"courier new",monospace;font-size:11.7px;letter-spacing:0.1755px;background-color:rgb(248,248,248)">bxp</span>` function instead of the `<span style="color:rgb(51,51,51);font-family:monaco,menlo,consolas,"courier new",monospace;font-size:11.7px;letter-spacing:0.1755px;background-color:rgb(248,248,248)">boxplot</span>` function. However, this isn't much help for users of downstream libraries like pandas and seaborn. The goal of #3 in general is to allow the following in e.g., seaborn:</div><div><br></div><div><pre style="font-family:monaco,menlo,consolas,"courier new",monospace;font-size:0.9em;border-radius:4px;letter-spacing:0.015em;padding:1em;border:1px solid rgb(204,204,204);background-color:rgb(248,248,248);line-height:17.64px;color:rgb(51,51,51)"><span class="m_-9028143491083852780gmail-kn" style="color:rgb(0,112,32)">import</span> <span class="m_-9028143491083852780gmail-nn" style="color:rgb(14,132,181);font-weight:bold">seaborn<br></span>
<span class="m_-9028143491083852780gmail-n">tips</span> <span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span> <span class="m_-9028143491083852780gmail-n">seaborn</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">.</span><span class="m_-9028143491083852780gmail-n">load_data</span><span class="m_-9028143491083852780gmail-p">(</span><span class="m_-9028143491083852780gmail-s1" style="color:rgb(64,112,160)">'tips'</span><span class="m_-9028143491083852780gmail-p">)</span>
<span class="m_-9028143491083852780gmail-n">g</span> <span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span> <span class="m_-9028143491083852780gmail-n">seaborn</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">.</span><span class="m_-9028143491083852780gmail-n">factorplot</span><span class="m_-9028143491083852780gmail-p">(</span><span class="m_-9028143491083852780gmail-n">x</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span><span class="m_-9028143491083852780gmail-s2" style="color:rgb(64,112,160)">"day"</span><span class="m_-9028143491083852780gmail-p">,</span> <span class="m_-9028143491083852780gmail-n">y</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span><span class="m_-9028143491083852780gmail-s2" style="color:rgb(64,112,160)">"total_bill"</span><span class="m_-9028143491083852780gmail-p">,</span> <span class="m_-9028143491083852780gmail-n">hue</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span><span class="m_-9028143491083852780gmail-s2" style="color:rgb(64,112,160)">"sex"</span><span class="m_-9028143491083852780gmail-p">,</span> <span class="m_-9028143491083852780gmail-n">data</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span><span class="m_-9028143491083852780gmail-n">tips</span><span class="m_-9028143491083852780gmail-p">,</span>
                       <span class="m_-9028143491083852780gmail-n">kind</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span><span class="m_-9028143491083852780gmail-s1" style="color:rgb(64,112,160)">'box'</span><span class="m_-9028143491083852780gmail-p">,</span> <span class="m_-9028143491083852780gmail-n">palette</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span><span class="m_-9028143491083852780gmail-s2" style="color:rgb(64,112,160)">"PRGn"</span><span class="m_-9028143491083852780gmail-p">,</span> <span class="m_-9028143491083852780gmail-n">shownotches</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span><span class="m_-9028143491083852780gmail-kc" style="color:rgb(0,112,32);font-weight:bold">True</span><span class="m_-9028143491083852780gmail-p">,</span>
                       <span class="m_-9028143491083852780gmail-n">statfxn</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span><span class="m_-9028143491083852780gmail-n">my_box_stats</span><span class="m_-9028143491083852780gmail-p">,</span> <span class="m_-9028143491083852780gmail-n">bootstrap_method</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span><span class="m_-9028143491083852780gmail-s1" style="color:rgb(64,112,160)">'BCA'</span><span class="m_-9028143491083852780gmail-p">,</span>
                       <span class="m_-9028143491083852780gmail-n">whisker_method</span><span class="m_-9028143491083852780gmail-o" style="color:rgb(102,102,102)">=</span><span class="m_-9028143491083852780gmail-s1" style="color:rgb(64,112,160)">'dynamic'</span><span class="m_-9028143491083852780gmail-p">)</span></pre></div><div><br></div><div>This kind of flexibility would also be available under the current pandas API.</div><div><br></div><div>This MEP is very much still a draft and has not been accepted. If you have opinions about the proposed changes (positive or negative) we're all ears.</div><div><br></div><div>-Paul H.</div><div><br></div><div>* It is our perception that the <span style="background-color:rgb(248,248,248);color:rgb(51,51,51);font-family:monaco,menlo,consolas,"courier new",monospace;font-size:0.9em;letter-spacing:0.015em">usermedians </span>and<span style="background-color:rgb(248,248,248);color:rgb(51,51,51);font-family:monaco,menlo,consolas,"courier new",monospace;font-size:0.9em;letter-spacing:0.015em"> </span><span style="background-color:rgb(248,248,248);color:rgb(51,51,51);font-family:monaco,menlo,consolas,"courier new",monospace;font-size:0.9em;letter-spacing:0.015em">conf_<wbr>intervals </span>parameters don't get much use and are fairly difficult use. Additionally, the logic that handles and validates them is quite complex and difficult to maintain.</div><div><br></div><div>** The <span style="background-color:rgb(248,248,248);color:rgb(51,51,51);font-family:monaco,menlo,consolas,"courier new",monospace;font-size:11.7px;letter-spacing:0.1755px">sym </span>parameter is redundant with the <span style="background-color:rgb(248,248,248);color:rgb(51,51,51);font-family:monaco,menlo,consolas,"courier new",monospace;font-size:11.7px;letter-spacing:0.1755px">flierprops </span>parameter, which has been around for a few releases now. The code that reconciles the default marker style with both of these inputs is also complex and difficult to maintain.</div></div>
</blockquote></div><br></div>