From c6d0d00eb7112edae2b5a3587afc8d0b34d7a8ea Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 28 Oct 2015 17:49:58 -0700 Subject: [PATCH 01/15] BUG: make the switch to range only if requested --- lib/matplotlib/cbook.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/matplotlib/cbook.py b/lib/matplotlib/cbook.py index f122e975c80..f3714aae40d 100644 --- a/lib/matplotlib/cbook.py +++ b/lib/matplotlib/cbook.py @@ -1760,13 +1760,14 @@ def delete_masked_points(*args): return margs -def boxplot_stats(X, whis=1.5, bootstrap=None, labels=None): - ''' - Returns list of dictionaries of staticists to be use to draw a series of - box and whisker plots. See the `Returns` section below to the required - keys of the dictionary. Users can skip this function and pass a user- - defined set of dictionaries to the new `axes.bxp` method instead of - relying on MPL to do the calcs. +def boxplot_stats(X, whis=1.5, autorange=False, bootstrap=None, + labels=None): + """ + Returns list of dictionaries of staticists to be use to draw a + series of box and whisker plots. See the `Returns` section below to + the required keys of the dictionary. Users can skip this function + and pass a user-defined set of dictionaries to the new `axes.bxp` + method instead of relying on MPL to do the calcs. Parameters ---------- @@ -1908,7 +1909,7 @@ def _compute_conf_interval(data, med, iqr, bootstrap): # interquartile range stats['iqr'] = q3 - q1 - if stats['iqr'] == 0: + if stats['iqr'] == 0 and autorange: whis = 'range' # conf. interval around median From 24ca9156b40fd3ffc66bb4d94b7a02634892ffc6 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 28 Oct 2015 17:50:38 -0700 Subject: [PATCH 02/15] DOC: update cbook docstring with new autoremove option --- lib/matplotlib/cbook.py | 60 +++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/lib/matplotlib/cbook.py b/lib/matplotlib/cbook.py index f3714aae40d..6e6e0b206e1 100644 --- a/lib/matplotlib/cbook.py +++ b/lib/matplotlib/cbook.py @@ -1763,37 +1763,39 @@ def delete_masked_points(*args): def boxplot_stats(X, whis=1.5, autorange=False, bootstrap=None, labels=None): """ - Returns list of dictionaries of staticists to be use to draw a - series of box and whisker plots. See the `Returns` section below to - the required keys of the dictionary. Users can skip this function - and pass a user-defined set of dictionaries to the new `axes.bxp` - method instead of relying on MPL to do the calcs. + Returns list of dictionaries of statistics used to draw a series + of box and whisker plots. See the `Returns` section below to the + required keys of the dictionary. Users can skip this function and + pass a user-defined set of dictionaries to the new `axes.bxp` method + instead of relying on MPL to do the calculations. Parameters ---------- X : array-like - Data that will be represented in the boxplots. Should have 2 or fewer - dimensions. - + Data that will be represented in the boxplots. Should have 2 or + fewer dimensions. whis : float, string, or sequence (default = 1.5) - As a float, determines the reach of the whiskers past the first and - third quartiles (e.g., Q3 + whis*IQR, QR = interquartile range, Q3-Q1). - Beyond the whiskers, data are considered outliers and are plotted as - individual points. Set this to an unreasonably high value to force the - whiskers to show the min and max data. Alternatively, set this to an - ascending sequence of percentile (e.g., [5, 95]) to set the whiskers - at specific percentiles of the data. Finally, can `whis` be the - string 'range' to force the whiskers to the min and max of the data. - In the edge case that the 25th and 75th percentiles are equivalent, - `whis` will be automatically set to 'range' - - bootstrap : int or None (default) - Number of times the confidence intervals around the median should - be bootstrapped (percentile method). - - labels : sequence - Labels for each dataset. Length must be compatible with dimensions - of `X` + As a float, determines the reach of the whiskers past the first + and third quartiles (e.g., Q3 + whis*IQR, QR = interquartile + range, Q3-Q1). Beyond the whiskers, data are considered outliers + and are plotted as individual points. This can be set this to an + ascending sequence of percentile (e.g., [5, 95]) to set the + whiskers at specific percentiles of the data. Finally, `whis` + can be the string ``'range'`` to force the whiskers to the + minimum and maximum of the data. In the edge case that the 25th + and 75th percentiles are equivalent, `whis` can be automatically + set to ``'range'`` via the `autorange` option. + autorange : bool, optional (False) + When `True` and the data are distributed such that the 25th and + 75th percentiles are equal, ``whis`` is set to ``'range'`` such + that the whisker ends are at the minimum and maximum of the + data. + bootstrap : int, optional + Number of times the confidence intervals around the median + should be bootstrapped (percentile method). + labels : array-like, optional + Labels for each dataset. Length must be compatible with + dimensions of `X`. Returns ------- @@ -1818,8 +1820,8 @@ def boxplot_stats(X, whis=1.5, autorange=False, bootstrap=None, Notes ----- - Non-bootstrapping approach to confidence interval uses Gaussian-based - asymptotic approximation: + Non-bootstrapping approach to confidence interval uses Gaussian- + based asymptotic approximation: .. math:: @@ -1829,7 +1831,7 @@ def boxplot_stats(X, whis=1.5, autorange=False, bootstrap=None, McGill, R., Tukey, J.W., and Larsen, W.A. (1978) "Variations of Boxplots", The American Statistician, 32:12-16. - ''' + """ def _bootstrap_median(data, N=5000): # determine 95% confidence intervals of the median From 8d4f5115cc43e75cc39504849edf77fb58473494 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 28 Oct 2015 20:47:28 -0700 Subject: [PATCH 03/15] TST: new baseline images for non-autoranged boxplots --- .../test_axes/boxplot_autorange_whiskers.pdf | Bin 4809 -> 4903 bytes .../test_axes/boxplot_autorange_whiskers.svg | 177 ++++++++++++++++++++- 2 files changed, 174 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_whiskers.pdf b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_whiskers.pdf index 933a067b2d06dde01c8e096bf08e4887318fcf32..e6bc5bba4911e7dbb3e2e7e9916d9bc096027ea3 100644 GIT binary patch delta 1938 zcmZuycTf~p91fs(E(%AnV|)mNCTzJbB_0Pz_3%I>D8k;cz>#D3W^a+hG8dGHqN9+F zVl*N~35b%Qs8NZ6*pomkBxXzzqk{@#i?N{$*`*{R**|u6zxS)}{l4#A^sIibG_LGJ zM4ph1XXwc+AO#4}Kyb2Jn?vXrAme`l9ByXjCNMZd0Pz42k24HGlR#2-*xM3EWa#lw z$_y59iwKa&q(CgfKq`O}3ycJS7QWgtQDk|9WLT`^P|7nK1Rn`sqo zX-$furlP`=uNMArAo$FS+=r;QzlPjX6P&0>EV=}w6Dp;ardv;Kwx?Rx))ZaRS^`BC zRA$gKI@!@aCcVD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D3f fwSFBr8(^5A6^12f) @@ -27,7 +27,11 @@ z " style="fill:#ffffff;"/> +<<<<<<< HEAD +<<<<<<< HEAD @@ -64,10 +69,51 @@ L 191.97 146.88 +======= + + + + + + + + + + + + + + + + + + + + + + +>>>>>>> TST: new baseline images for non-autoranged boxplots - +<<<<<<< HEAD +<<<<<<< HEAD @@ -104,9 +151,40 @@ L 415.17 146.88 +======= + + + + + + + + + + + + + + + + + + + +>>>>>>> TST: new baseline images for non-autoranged boxplots - +<<<<<<< HEAD @@ -114,6 +192,15 @@ L 72 43.2 + + + @@ -132,20 +219,34 @@ L 518.4 43.2 +======= +" id="m9412c4578c" style="stroke:#000000;stroke-width:0.5;"/> + + + +>>>>>>> TST: new baseline images for non-autoranged boxplots +======= +" id="m99f775e861" style="stroke:#000000;stroke-width:0.5;"/> + + + +>>>>>>> TST: new baseline images for non-autoranged boxplots @@ -173,12 +274,20 @@ z +<<<<<<< HEAD +======= + +>>>>>>> TST: new baseline images for non-autoranged boxplots +<<<<<<< HEAD +======= + +>>>>>>> TST: new baseline images for non-autoranged boxplots @@ -206,7 +315,11 @@ Q 53.21875 48.921875 51.53125 44.890625 Q 49.859375 40.875 45.40625 35.40625 Q 44.1875 33.984375 37.640625 27.21875 Q 31.109375 20.453125 19.1875 8.296875 +<<<<<<< HEAD " id="DejaVuSans-32"/> +======= +" id="BitstreamVeraSans-Roman-32"/> +>>>>>>> TST: new baseline images for non-autoranged boxplots @@ -220,20 +333,34 @@ Q 31.109375 20.453125 19.1875 8.296875 +======= +" id="md2bdd89ecf" style="stroke:#000000;stroke-width:0.5;"/> + + + +>>>>>>> TST: new baseline images for non-autoranged boxplots +======= +" id="mbc0df95c53" style="stroke:#000000;stroke-width:0.5;"/> + + + +>>>>>>> TST: new baseline images for non-autoranged boxplots @@ -244,7 +371,11 @@ L 73.1875 35.5 L 73.1875 27.203125 L 10.59375 27.203125 z +<<<<<<< HEAD " id="DejaVuSans-2212"/> +======= +" id="BitstreamVeraSans-Roman-2212"/> +>>>>>>> TST: new baseline images for non-autoranged boxplots +<<<<<<< HEAD +======= + +>>>>>>> TST: new baseline images for non-autoranged boxplots +<<<<<<< HEAD +======= + +>>>>>>> TST: new baseline images for non-autoranged boxplots @@ -291,12 +430,20 @@ z +<<<<<<< HEAD +======= + +>>>>>>> TST: new baseline images for non-autoranged boxplots +<<<<<<< HEAD +======= + +>>>>>>> TST: new baseline images for non-autoranged boxplots @@ -320,7 +467,11 @@ Q 19.53125 -1.421875 13.0625 8.265625 Q 6.59375 17.96875 6.59375 36.375 Q 6.59375 54.828125 13.0625 64.515625 Q 19.53125 74.21875 31.78125 74.21875 +<<<<<<< HEAD " id="DejaVuSans-30"/> +======= +" id="BitstreamVeraSans-Roman-30"/> +>>>>>>> TST: new baseline images for non-autoranged boxplots @@ -330,12 +481,20 @@ Q 19.53125 74.21875 31.78125 74.21875 +<<<<<<< HEAD +======= + +>>>>>>> TST: new baseline images for non-autoranged boxplots +<<<<<<< HEAD +======= + +>>>>>>> TST: new baseline images for non-autoranged boxplots @@ -348,12 +507,20 @@ Q 19.53125 74.21875 31.78125 74.21875 +<<<<<<< HEAD +======= + +>>>>>>> TST: new baseline images for non-autoranged boxplots +<<<<<<< HEAD +======= + +>>>>>>> TST: new baseline images for non-autoranged boxplots @@ -367,7 +534,11 @@ Q 19.53125 74.21875 31.78125 74.21875 +<<<<<<< HEAD +======= + +>>>>>>> TST: new baseline images for non-autoranged boxplots From 4099a8804488a591f23a8a165d6710033ce9ca26 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 28 Oct 2015 20:57:24 -0700 Subject: [PATCH 04/15] TST: rename existing autorange figures --- ...ge_whiskers.pdf => boxplot_autorange_false_whiskers.pdf} | Bin ...ge_whiskers.png => boxplot_autorange_false_whiskers.png} | Bin ...ge_whiskers.svg => boxplot_autorange_false_whiskers.svg} | 0 lib/matplotlib/tests/test_axes.py | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) rename lib/matplotlib/tests/baseline_images/test_axes/{boxplot_autorange_whiskers.pdf => boxplot_autorange_false_whiskers.pdf} (100%) rename lib/matplotlib/tests/baseline_images/test_axes/{boxplot_autorange_whiskers.png => boxplot_autorange_false_whiskers.png} (100%) rename lib/matplotlib/tests/baseline_images/test_axes/{boxplot_autorange_whiskers.svg => boxplot_autorange_false_whiskers.svg} (100%) diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_whiskers.pdf b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.pdf similarity index 100% rename from lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_whiskers.pdf rename to lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.pdf diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_whiskers.png b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.png similarity index 100% rename from lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_whiskers.png rename to lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.png diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_whiskers.svg b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.svg similarity index 100% rename from lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_whiskers.svg rename to lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.svg diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index df0e48e0cef..615f355915c 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -1785,7 +1785,7 @@ def test_boxplot_sym(): ax.set_ylim((-30, 30)) -@image_comparison(baseline_images=['boxplot_autorange_whiskers']) +@image_comparison(baseline_images=['boxplot_autorange_false_whiskers']) def test_boxplot_autorange_whiskers(): x = np.ones(140) x = np.hstack([0, x, 2]) From 4ef90dd415ea2619aa0127b13924d109793591e5 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 28 Oct 2015 21:40:25 -0700 Subject: [PATCH 05/15] TST: autorange tests for boxplot_stats --- lib/matplotlib/tests/test_cbook.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/matplotlib/tests/test_cbook.py b/lib/matplotlib/tests/test_cbook.py index b7d2e62f1aa..1172fcb31c4 100644 --- a/lib/matplotlib/tests/test_cbook.py +++ b/lib/matplotlib/tests/test_cbook.py @@ -265,6 +265,20 @@ def test_bad_dims(self): data = np.random.normal(size=(34, 34, 34)) results = cbook.boxplot_stats(data) + def test_boxplot_stats_autorange_false(self): + x = np.zeros(shape=140) + x = np.hstack([-25, x, 25]) + bstats_false = cbook.boxplot_stats(x, autorange=False) + bstats_true = cbook.boxplot_stats(x, autorange=True) + + assert_equal(bstats_false[0]['whislo'], 0) + assert_equal(bstats_false[0]['whishi'], 0) + assert_array_almost_equal(bstats_false[0]['fliers'], [-25, 25]) + + assert_equal(bstats_true[0]['whislo'], -25) + assert_equal(bstats_true[0]['whishi'], 25) + assert_array_almost_equal(bstats_true[0]['fliers'], []) + class Test_callback_registry(object): def setup(self): From 39a4784397c9735186df785b06652ca27ed49098 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 28 Oct 2015 22:06:04 -0700 Subject: [PATCH 06/15] ENH: propagate autorange to boxplot --- lib/matplotlib/axes/_axes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index f923c8ca0fe..5d80da3b543 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3052,7 +3052,8 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, meanline=None, showmeans=None, showcaps=None, showbox=None, showfliers=None, boxprops=None, labels=None, flierprops=None, medianprops=None, meanprops=None, - capprops=None, whiskerprops=None, manage_xticks=True): + capprops=None, whiskerprops=None, manage_xticks=True, + autorange=False): """ Make a box and whisker plot. @@ -3216,7 +3217,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, if bootstrap is None: bootstrap = rcParams['boxplot.bootstrap'] bxpstats = cbook.boxplot_stats(x, whis=whis, bootstrap=bootstrap, - labels=labels) + labels=labels, autorange=autorange) if notch is None: notch = rcParams['boxplot.notch'] if vert is None: From ee74cb81ffa46c5296b85e7134bfec0f22494a16 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 28 Oct 2015 22:07:10 -0700 Subject: [PATCH 07/15] TST: tests and images autorange boxplots --- .../test_axes/boxplot_autorange_true_whiskers.pdf | Bin 0 -> 4861 bytes .../test_axes/boxplot_autorange_true_whiskers.png | Bin 0 -> 6890 bytes .../test_axes/boxplot_autorange_true_whiskers.svg | 374 +++++++++++++++++++++ lib/matplotlib/tests/test_axes.py | 15 +- 4 files changed, 384 insertions(+), 5 deletions(-) create mode 100644 lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.pdf create mode 100644 lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.png create mode 100644 lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.svg diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.pdf b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ac8faeb773bc114cecfd72e073348392e5a12944 GIT binary patch literal 4861 zcmb_g30M?Y5>_D!jVNM3Kuw+yPlP^ZdJc|6P9=z(3ae;nW*QiTnW3i#0kbH|8uLXH zz3v;{uWlo41Chs8h<%B85j- zz=HbL`+hA0xaRP`cs{)BJ^x_wrA977wY}_c{|X1=2iJCu8JHNin^o!8CB~G=JWsw@ z9JJUTw~LJgAA;vg~5=hdxDf4yP6^YS`1h z&ZVQgT+uP&(5mak;KdDJ{`8<#FbA(YBE&l>mjpS4%RX^Ua$AKP={||B-r8x6e;|e4PKiP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NV|Ju&+rv-dpeZl^^VZi zpMQVkuyxBU&z=Ef?CVxHRry*o?-MEGiRZvGUKLh zxeqH|TT~UeCcNzU==Qa*o9Ev=81G$_>n#*I4vA>UaL(QD8JD&@q+-RizSlcTkKPIR zzH;R+r#BA&efav@?ZLbB*T&`+`koU!n6GxpPkK2Gjd~%ZII7BcebFq5QhT4-422bjfyt`*;XxuT_PHC!6E9RKsbV=2a z>^ii#J(1Z?Ep9yENOC4#YC*_wooLA^GkAeZh5`>|GN02!q16c{F(QW(5Jiw!HjWbo zom9UADGFCy`0ILtI*w%`d6P!a8AXGDXsNp)NUQ>PFkqOaAt9%6`B1z6$(if zT2}5Qfe>Vr9(n=XE#WRDQkRv*;|2w~iCGBF6IsFw21FY4u%bB6fLI2RS3LK zb;b>^vUkk#Ss+v>6ZtIRifAaoHvW z-467K#wolmI|uqe8OY&qVa-xjB-5;~Sh*7VEs@WkVGDgP0kFiq_mJATg|UI%nuQb; z_5UE^f7K(SRY(pvk}D{rlBtkFrXbWTg_Ka}7$u8jkgzeaU?+Z$TX zfo;2NBWxLAGepuLSAr1aHf%n|L6?3kg_#nVKokDnr3D*BQH1o)sz9w!BO75LSTKNb z@FYpG23%lF*pY+>j0qb_Sg~RPx|w#Jb~n?$&BY}!AYZ39L#?vh)4Szti4#|uSe+J^7wJBo)Lls|zX`z2*9<8g z8)UNvu-_fn2)Ln&I)gqEU--vG1~C-P(iEd&XqJ^L0x0EJiW)m!y7g<#8o2U~%jZO6 zo1x}a83)1gYNd^PPqI7bT jbtOFPEBsWX&oUqhl-3_jI6;)QU5?w8(W9f{qlte5!=KAQ literal 0 HcmV?d00001 diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.png b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.png new file mode 100644 index 0000000000000000000000000000000000000000..e2d51f7550421e131d64c3165301df3deee3672b GIT binary patch literal 6890 zcmeI1cUV(t+QtvPC~al{MIelzC`eNokgf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bB20uD!HuL~C!g&(}TzhhT&Q<|2fzN{|~4r7!!F+H8g2MbdNQRfIhKjP%bySp&0 zfiV9{I&q5$p3^Q`UJf!k>F(wh3&IUaeO_N4pcA=Lf0v^S3IcnN5H~e7b?Pe*BmL)raqB`)y@|!OJTf*c`hab}I}DuE>f)j)!%_mjl3y9ePjoSLt4;SzXA2 zbFx6t3>`h~`Yt2!9iVY~#lWhnL->4KDL@gdtU#$Cd$*aSs$J|2Wosfp+w6)8-J7cR zXXXyoas!{QVOw$`(SNkLp|;itsDSg^H_3|fTPe!OrNc+lMq1S!J#1VLYS z?Ck5S4k8f4%KTpvklGszlgkKa5M0WD6sUCSoT5cW0>FWfaS+RZox@V+JCHR~=fDt& u@^GAj1^3a*>jlfm2m1Fv{qK+wH1s0#b)k_!PA1SG$js!Jap3{SOMe4WlBVSV literal 0 HcmV?d00001 diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.svg b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.svg new file mode 100644 index 00000000000..ef4b833c797 --- /dev/null +++ b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.svg @@ -0,0 +1,374 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 615f355915c..a7b87c150d3 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -1785,14 +1785,19 @@ def test_boxplot_sym(): ax.set_ylim((-30, 30)) -@image_comparison(baseline_images=['boxplot_autorange_false_whiskers']) +@image_comparison(baseline_images=['boxplot_autorange_false_whiskers', + 'boxplot_autorange_true_whiskers']) def test_boxplot_autorange_whiskers(): x = np.ones(140) x = np.hstack([0, x, 2]) - fig, ax = plt.subplots() - - ax.boxplot([x, x], bootstrap=10000, notch=1) - ax.set_ylim((-5, 5)) + + fig1, ax1 = plt.subplots() + ax1.boxplot([x, x], bootstrap=10000, notch=1) + ax1.set_ylim((-5, 5)) + + fig2, ax2 = plt.subplots() + ax2.boxplot([x, x], bootstrap=10000, notch=1, autorange=True) + ax2.set_ylim((-5, 5)) def _rc_test_bxp_helper(ax, rc_dict): x = np.linspace(-7, 7, 140) From 7d125cf8b3c8eec849140b0a26baf1c7b4cca0a9 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 28 Oct 2015 23:10:36 -0700 Subject: [PATCH 08/15] DOC: updated boxplot docstring --- lib/matplotlib/axes/_axes.py | 221 ++++++++++++++++++++----------------------- 1 file changed, 104 insertions(+), 117 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 5d80da3b543..596fbfcfa03 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3050,10 +3050,10 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, positions=None, widths=None, patch_artist=None, bootstrap=None, usermedians=None, conf_intervals=None, meanline=None, showmeans=None, showcaps=None, - showbox=None, showfliers=None, boxprops=None, labels=None, - flierprops=None, medianprops=None, meanprops=None, - capprops=None, whiskerprops=None, manage_xticks=True, - autorange=False): + showbox=None, showfliers=None, boxprops=None, + labels=None, flierprops=None, medianprops=None, + meanprops=None, capprops=None, whiskerprops=None, + manage_xticks=True, autorange=False): """ Make a box and whisker plot. @@ -3063,9 +3063,10 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, positions=None, widths=None, patch_artist=False, bootstrap=None, usermedians=None, conf_intervals=None, meanline=False, showmeans=False, showcaps=True, - showbox=True, showfliers=True, boxprops=None, labels=None, - flierprops=None, medianprops=None, meanprops=None, - capprops=None, whiskerprops=None, manage_xticks=True): + showbox=True, showfliers=True, boxprops=None, + labels=None, flierprops=None, medianprops=None, + meanprops=None, capprops=None, whiskerprops=None, + manage_xticks=True, autorange=False): Make a box and whisker plot for each column of *x* or each vector in sequence *x*. The box extends from the lower to @@ -3076,119 +3077,104 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, Parameters ---------- x : Array or a sequence of vectors. - The input data. - - notch : bool, default = False - If False, produces a rectangular box plot. - If True, will produce a notched box plot - - sym : str or None, default = None - The default symbol for flier points. - Enter an empty string ('') if you don't want to show fliers. - If `None`, then the fliers default to 'b+' If you want more - control use the flierprops kwarg. - - vert : bool, default = True - If True (default), makes the boxes vertical. - If False, makes horizontal boxes. - - whis : float, sequence (default = 1.5) or string - As a float, determines the reach of the whiskers past the first - and third quartiles (e.g., Q3 + whis*IQR, IQR = interquartile - range, Q3-Q1). Beyond the whiskers, data are considered outliers - and are plotted as individual points. Set this to an unreasonably - high value to force the whiskers to show the min and max values. - Alternatively, set this to an ascending sequence of percentile - (e.g., [5, 95]) to set the whiskers at specific percentiles of - the data. Finally, *whis* can be the string 'range' to force the - whiskers to the min and max of the data. In the edge case that - the 25th and 75th percentiles are equivalent, *whis* will be - automatically set to 'range'. - - bootstrap : None (default) or integer - Specifies whether to bootstrap the confidence intervals - around the median for notched boxplots. If bootstrap==None, - no bootstrapping is performed, and notches are calculated - using a Gaussian-based asymptotic approximation (see McGill, R., - Tukey, J.W., and Larsen, W.A., 1978, and Kendall and Stuart, - 1967). Otherwise, bootstrap specifies the number of times to - bootstrap the median to determine it's 95% confidence intervals. - Values between 1000 and 10000 are recommended. - - usermedians : array-like or None (default) - An array or sequence whose first dimension (or length) is - compatible with *x*. This overrides the medians computed by - matplotlib for each element of *usermedians* that is not None. - When an element of *usermedians* == None, the median will be - computed by matplotlib as normal. - - conf_intervals : array-like or None (default) - Array or sequence whose first dimension (or length) is compatible - with *x* and whose second dimension is 2. When the current element - of *conf_intervals* is not None, the notch locations computed by - matplotlib are overridden (assuming notch is True). When an - element of *conf_intervals* is None, boxplot compute notches the - method specified by the other kwargs (e.g., *bootstrap*). - - positions : array-like, default = [1, 2, ..., n] - Sets the positions of the boxes. The ticks and limits - are automatically set to match the positions. - - widths : array-like, default = 0.5 - Either a scalar or a vector and sets the width of each box. The - default is 0.5, or ``0.15*(distance between extreme positions)`` - if that is smaller. - - labels : sequence or None (default) - Labels for each dataset. Length must be compatible with - dimensions of *x* - - patch_artist : bool, default = False - If False produces boxes with the Line2D artist - If True produces boxes with the Patch artist - - showmeans : bool, default = False - If True, will toggle on the rendering of the means - - showcaps : bool, default = True - If True, will toggle on the rendering of the caps - - showbox : bool, default = True - If True, will toggle on the rendering of the box - - showfliers : bool, default = True - If True, will toggle on the rendering of the fliers - - boxprops : dict or None (default) - If provided, will set the plotting style of the boxes - - whiskerprops : dict or None (default) - If provided, will set the plotting style of the whiskers - - capprops : dict or None (default) - If provided, will set the plotting style of the caps - - flierprops : dict or None (default) - If provided, will set the plotting style of the fliers - - medianprops : dict or None (default) - If provided, will set the plotting style of the medians - - meanprops : dict or None (default) - If provided, will set the plotting style of the means - - meanline : bool, default = False - If True (and *showmeans* is True), will try to render the mean - as a line spanning the full width of the box according to - *meanprops*. Not recommended if *shownotches* is also True. - Otherwise, means will be shown as points. - - manage_xticks : bool, default = True + The input data. + notch : bool, optional (False) + If `True`, will produce a notched box plot. Otherwise, a + rectangular boxplot is produced. + sym : str, optional + The default symbol for flier points. Enter an empty string + ('') if you don't want to show fliers. If `None`, then the + fliers default to 'b+' If you want more control use the + flierprops kwarg. + vert : bool, optional (True) + If `True` (default), makes the boxes vertical. If `False`, + everything is drawn horizontally. + whis : float, sequence, or string (default = 1.5) + As a float, determines the reach of the whiskers past the + first and third quartiles (e.g., Q3 + whis*IQR, + IQR = interquartile range, Q3-Q1). Beyond the whiskers, data + are considered outliers and are plotted as individual + points. Set this to an unreasonably high value to force the + whiskers to show the min and max values. Alternatively, set + this to an ascending sequence of percentile (e.g., [5, 95]) + to set the whiskers at specific percentiles of the data. + Finally, ``whis`` can be the string ``'range'`` to force the + whiskers to the min and max of the data. In the edge case + that the 25th and 75th percentiles are equivalent, *whis* + will be automatically set to ``'range'``. + bootstrap : int, optional + Specifies whether to bootstrap the confidence intervals + around the median for notched boxplots. If bootstrap==None, + no bootstrapping is performed, and notches are calculated + using a Gaussian-based asymptotic approximation (see McGill, + R., Tukey, J.W., and Larsen, W.A., 1978, and Kendall and + Stuart, 1967). Otherwise, bootstrap specifies the number of + times to bootstrap the median to determine its 95% + confidence intervals. Values between 1000 and 10000 are + recommended. + usermedians : array-like, optional + An array or sequence whose first dimension (or length) is + compatible with ``x``. This overrides the medians computed + by matplotlib for each element of *usermedians* that is not + `None`. When an element of *usermedians* == None, the median + will be computed by matplotlib as normal. + conf_intervals : array-like, optional + Array or sequence whose first dimension (or length) is + compatible with ``x`` and whose second dimension is 2. When + the current element of ``conf_intervals`` is not None, the + notch locations computed by matplotlib are overridden + (provided ``notch`` is `True`). When an element of + ``conf_intervals`` is `None`, the notches are computed by the + method specified by the other kwargs (e.g., ``bootstrap``). + positions : array-like, optional + Sets the positions of the boxes. The ticks and limits are + automatically set to match the positions. Defaults to + `range(1, N+1)` where N is the number of boxes to be drawn. + widths : scalar or array-like + Sets the width of each box either with a scalar or a + sequence. The default is 0.5, or ``0.15*(distance between + extreme positions)``, if that is smaller. + patch_artist : bool, optional (False) + If `False` produces boxes with the Line2D artist. Otherwise, + boxes and drawn with Patch artists. + labels : sequence, optional + Labels for each dataset. Length must be compatible with + dimensions of ``x``. + manage_xticks : bool, optional (True) If the function should adjust the xlim and xtick locations. + autorange : bool, optional (False) + When `True` and the data are distributed such that the 25th and + 75th percentiles are equal, ``whis`` is set to ``'range'`` such + that the whisker ends are at the minimum and maximum of the + data. + meanline : bool, optional (False) + If `True` (and ``showmeans`` is `True`), will try to render + the mean as a line spanning the full width of the box + according to ``meanprops`` (see below). Not recommended if + ``shownotches`` is also True. Otherwise, means will be shown + as points. + + Additional Options + --------------------- + The following boolean options toogle the drawing of individual + components of the boxplots: + - showcaps: the caps on the ends of whiskers + (default is True) + - showbox: the central box (default is True) + - showfliers: the outlierd beyone the caps (default is True) + - showmeans: the arithmetic means (default is False) + + The remaining options can accept dictionaries that specify the + style of the individual artists: + - capprops + - boxprops + - whiskerprops + - flierprops + - medianprops + - meanprops Returns ------- - result : dict A dictionary mapping each component of the boxplot to a list of the :class:`matplotlib.lines.Line2D` @@ -3207,9 +3193,10 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, Examples -------- - .. plot:: mpl_examples/statistics/boxplot_demo.py + """ + # If defined in matplotlibrc, apply the value from rc file # Overridden if argument is passed if whis is None: From fa2b7701776d8e94de1755608c8032d4401b9375 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Tue, 26 Jan 2016 17:14:03 -0800 Subject: [PATCH 09/15] TST: only test PNGs for autorange bug --- .../test_axes/boxplot_autorange_false_whiskers.pdf | Bin 4903 -> 0 bytes .../test_axes/boxplot_autorange_false_whiskers.svg | 545 --------------------- .../test_axes/boxplot_autorange_true_whiskers.pdf | Bin 4861 -> 0 bytes .../test_axes/boxplot_autorange_true_whiskers.svg | 374 -------------- lib/matplotlib/tests/test_axes.py | 7 +- 5 files changed, 5 insertions(+), 921 deletions(-) delete mode 100644 lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.pdf delete mode 100644 lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.svg delete mode 100644 lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.pdf delete mode 100644 lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.svg diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.pdf b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.pdf deleted file mode 100644 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b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.svg deleted file mode 100644 index f958b0bc192..00000000000 --- a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.svg +++ /dev/null @@ -1,545 +0,0 @@ - - - - - - - - - - - - - - - - -<<<<<<< HEAD - - - -<<<<<<< HEAD - - - - - - - - - - - - - -======= - - - - - - - - - - - - - - - - - - - - - - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - -<<<<<<< HEAD - - - -<<<<<<< HEAD - - - - - - - - - - - - - -======= - - - - - - - - - - - - - - - - - - - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - -<<<<<<< HEAD - - - - - - - - - - - - - - - - - - - - - - -======= -" id="m9412c4578c" style="stroke:#000000;stroke-width:0.5;"/> - - - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - - - -======= -" id="m99f775e861" style="stroke:#000000;stroke-width:0.5;"/> - - - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - - - - - - - - - - -<<<<<<< HEAD - -======= - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - -<<<<<<< HEAD - -======= - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - -======= -" id="BitstreamVeraSans-Roman-32"/> ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - - - - - - - - - - -======= -" id="md2bdd89ecf" style="stroke:#000000;stroke-width:0.5;"/> - - - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - - - -======= -" id="mbc0df95c53" style="stroke:#000000;stroke-width:0.5;"/> - - - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - -======= -" id="BitstreamVeraSans-Roman-2212"/> ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - - - - - - -<<<<<<< HEAD - -======= - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - -<<<<<<< HEAD - -======= - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - - - - - - - - -<<<<<<< HEAD - -======= - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - -<<<<<<< HEAD - -======= - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - -======= -" id="BitstreamVeraSans-Roman-30"/> ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - - - - -<<<<<<< HEAD - -======= - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - -<<<<<<< HEAD - -======= - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - - - - - - - -<<<<<<< HEAD - -======= - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - -<<<<<<< HEAD - -======= - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - - - - - - - - - - -<<<<<<< HEAD - -======= - ->>>>>>> TST: new baseline images for non-autoranged boxplots - - - - diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.pdf b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.pdf deleted file mode 100644 index ac8faeb773bc114cecfd72e073348392e5a12944..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4861 zcmb_g30M?Y5>_D!jVNM3Kuw+yPlP^ZdJc|6P9=z(3ae;nW*QiTnW3i#0kbH|8uLXH zz3v;{uWlo41Chs8h<%B85j- zz=HbL`+hA0xaRP`cs{)BJ^x_wrA977wY}_c{|X1=2iJCu8JHNin^o!8CB~G=JWsw@ z9JJUTw~LJgAA;vg~5=hdxDf4yP6^YS`1h z&ZVQgT+uP&(5mak;KdDJ{`8<#FbA(YBE&l>mjpS4%RX^Ua$AKP={||B-r8x6e;|e4PKiP34>SZ@u}#jhi)p zj%qo4`|%spZ*?PfE_l;@`oII9I)yD9_VZHClznIE^B1f9lA6w38qzT7r={9f_mSrU zSMEUZk%eyG25#&_GdT*w~Ud1Uvc&|`FiJk{I0ylpA@zW=wH zG$&uLy<2x0(=TkeiAL@4@wjj{X`^S@%-}`7DfiYqV2<8jMOOdNmU_Rnd1v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-422bjfyt`*;XxuT_PHC!6E9RKsbV=2a z>^ii#J(1Z?Ep9yENOC4#YC*_wooLA^GkAeZh5`>|GN02!q16c{F(QW(5Jiw!HjWbo zom9UADGFCy`0ILtI*w%`d6P!a8AXGDXsNp)NUQ>PFkqOaAt9%6`B1z6$(if zT2}5Qfe>Vr9(n=XE#WRDQkRv*;|2w~iCGBF6IsFw21FY4u%bB6fLI2RS3LK zb;b>^vUkk#Ss+v>6ZtIRifAaoHvW z-467K#wolmI|uqe8OY&qVa-xjB-5;~Sh*7VEs@WkVGDgP0kFiq_mJATg|UI%nuQb; z_5UE^f7K(SRY(pvk}D{rlBtkFrXbWTg_Ka}7$u8jkgzeaU?+Z$TX zfo;2NBWxLAGepuLSAr1aHf%n|L6?3kg_#nVKokDnr3D*BQH1o)sz9w!BO75LSTKNb z@FYpG23%lF*pY+>j0qb_Sg~RPx|w#Jb~n?$&BY}!AYZ39L#?vh)4Szti4#|uSe+J^7wJBo)Lls|zX`z2*9<8g z8)UNvu-_fn2)Ln&I)gqEU--vG1~C-P(iEd&XqJ^L0x0EJiW)m!y7g<#8o2U~%jZO6 zo1x}a83)1gYNd^PPqI7bT jbtOFPEBsWX&oUqhl-3_jI6;)QU5?w8(W9f{qlte5!=KAQ diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.svg b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.svg deleted file mode 100644 index ef4b833c797..00000000000 --- a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.svg +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index a7b87c150d3..60f2b1d2f1e 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -1785,8 +1785,11 @@ def test_boxplot_sym(): ax.set_ylim((-30, 30)) -@image_comparison(baseline_images=['boxplot_autorange_false_whiskers', - 'boxplot_autorange_true_whiskers']) +@image_comparison( + baseline_images=['boxplot_autorange_false_whiskers', + 'boxplot_autorange_true_whiskers'], + extensions=['png'], +) def test_boxplot_autorange_whiskers(): x = np.ones(140) x = np.hstack([0, x, 2]) From 974bef9f3b54485bd77b9691b3e4081ffaba7f96 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Tue, 26 Jan 2016 17:30:39 -0800 Subject: [PATCH 10/15] PEP8: whitespace --- lib/matplotlib/tests/test_cbook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/tests/test_cbook.py b/lib/matplotlib/tests/test_cbook.py index 1172fcb31c4..f80af590623 100644 --- a/lib/matplotlib/tests/test_cbook.py +++ b/lib/matplotlib/tests/test_cbook.py @@ -270,7 +270,7 @@ def test_boxplot_stats_autorange_false(self): x = np.hstack([-25, x, 25]) bstats_false = cbook.boxplot_stats(x, autorange=False) bstats_true = cbook.boxplot_stats(x, autorange=True) - + assert_equal(bstats_false[0]['whislo'], 0) assert_equal(bstats_false[0]['whishi'], 0) assert_array_almost_equal(bstats_false[0]['fliers'], [-25, 25]) From e4634bccebff7326d4cd2418c4dabf58c0a483ba Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 17 Feb 2016 19:42:33 -0800 Subject: [PATCH 11/15] TST: update boxplot-autorange test images --- .../test_axes/boxplot_autorange_false_whiskers.png | Bin 6847 -> 6516 bytes .../test_axes/boxplot_autorange_true_whiskers.png | Bin 6890 -> 6847 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.png b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_false_whiskers.png index de33550ddf1c9eb3ac0f2642f06d0aadab6a9d31..788c38e8effa13844ffa41e93c6e4543322c695e 100644 GIT binary patch literal 6516 zcmeHMcUV(r+dm9}iU<)|BBOPnB1`s&u@#vW6e+SKl&I_x*&_t>6;VQHwE_x+BBCP8 zD0|PORv`^Ym;oe8*fT&FN!};=U4CD`_pkTQ_A1xKm4}e?oOAAT|JI$`=j<#ccJA8= zL6C&CmAL~138_MmptG0=c;{in^$_qP9QvKLqZs&!6T6%Y{{AY&$|V$nB!A@p3OqwR z^@Sh>S!?re9iy`6=*WQHRStP6(xt%hkDyk~tC@-V;|J0B2=NqmBl`a9zwLT3&?Ou; zkZzT}-oq|VLt6zSEOLdJ;Ieg!y@9Wc6 z6C0Q0b$0z?XS`s~GgH1T$01x;KH=L4r^HjL0-yEzRe(#g(#~Un7td`eRR}t@Pe2fY z9>e}w{ugz4Na_}f8ftDn6+o}mzxp;4*4f!vz=WVh6}xOB7zTsU!E(1V4FX-KjPvh8 z3g1=+(f8SAXllTPpoEpl*;$cAPZE~_<)30TXo6|2*@+&4LCgX{s z%17WrW7p9h2inB7>ZQQ3a87M1j{x=>i5cqcy@*r_3=F*4r%kIUFK3$wk@hn6Pej*k z$1)FxL6B-HBmhC(Vp5-$iRkAJg})G>kZ+C4S|(Lbd1f!C?vwY=?(+=$t2Kb{akyuF z)W*jQ#u8a2&HCQqj_v|mTZ#ab@Qtw5-7+j^hIr*odZtPEb5H=!;bqxk;hdZtqBn)$ z6CA7s-vL2)_Nay%XlqL;DJh|OoON=!Z;uWC_(#H4IVJ8jC$3TmO31CjJ{x=R=J>FX zgJl|m8?`+j*_49WT03+4^yw*M2s)Rot{T2P=wH@xM@D@-c67@lZkwT^1s8=N3t<5V zH3Yjw@=;;o(RfzA%6$UB*MX!e&)$|4twwptlWfmoa3Vs~`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WxJq6#8AJBz zex9i9y5mes!7B}W0a3I-Yhvh+j*`O{=cG{QS_(Yn78bp6^A4fB$rOU%e2Xlc60*(b zMa=yyP(z1?hqdgnXU`@8&UaNz462?7g6fZjmwyi>mfJR9B8LO7!U$;No2^C1r?LM{ zeCfFEfuIgC7Nf%yD8{bFhlj{P>>h)lahEfIa+|S1lH5cCN;lE}ruUMZQw%A5Dwq9! zuU5@otqOl$<=k9wmJJND7F5sj0G+ugvGr~*qQvCdkba-`f!>O)0pz@)z1>kD$Fw)i zu5~Q1iLN-p*j@lj?bE_n-mF6)62Mw`CRtx!A6OtV z-sS9FKyz&h=VU0=h#}jodqe;zM|?!-?&aK`xPuN3M(L)Gj*e1NT~vj_byioSlZ}7<>1VGNX=Fzb zCUgX&6w*522|Sy*xw%zzV2Wgvl+0Ev0tpkuXlZFlClW``KLxt)e5QudXPeVp;^2Y% zINogW;&f{#Tc?vZUDWGgI{(ppcu9ImD=I3|nw#x&Ks5;>ENQQj=dxSuB>|AjPA$GO zV&MUusO_i-5qNtMuRs|Mg7=A*0ZN5=eM3WzXlG|v3ksX&uYj=Fipr%e16o7@W|WPBL{|N&?)q0xkjVii8dD0&QwKy^3@)_khIb>ngbd`AGWvh;SU_H@ zt5%DNnVV74c1DZdzqm)+z+fE+IZ*LFHO-8dLc{>*r z63wKDF$&WOLE@pvF-Qm?)i5e^J1xhF) z-*0h>Q488f2Dq39Blh|T2|?T{@sW+_)q# zU%Db!x(Qk!fMR+rtRsrhy&R&J|Dj9LUr8sm_e+%ER(5+KycJ=U;(q^7tYL#nw1d#;^&Ou rqQ0)nzvXHCtFiSxzRLIQ;Vyp}8&;mEvVJcf0+*%v0kgavF6aLaMopOF diff --git a/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.png b/lib/matplotlib/tests/baseline_images/test_axes/boxplot_autorange_true_whiskers.png index e2d51f7550421e131d64c3165301df3deee3672b..de33550ddf1c9eb3ac0f2642f06d0aadab6a9d31 100644 GIT binary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L)raqB`)y@|!OJTf*c`hab}I}DuE>f)j)!%_mjl3y9ePjoSLt4;SzXA2 zbFx6t3>`h~`Yt2!9iVY~#lWhnL->4KDL@gdtU#$Cd$*aSs$J|2Wosfp+w6)8-J7cR zXXXyoas!{QVOw$`(SNkLp|;itsDSg^H_3|fTPe!OrNc+lMq1S!J#1VLYS z?Ck5S4k8f4%KTpvklGszlgkKa5M0WD6sUCSoT5cW0>FWfaS+RZox@V+JCHR~=fDt& u@^GAj1^3a*>jlfm2m1Fv{qK+wH1s0#b)k_!PA1SG$js!Jap3{SOMe4WlBVSV From 14192cadd2acaf930d7b1f1c08861d60f33843b4 Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Wed, 17 Feb 2016 20:22:11 -0800 Subject: [PATCH 12/15] DOC: boxplot typos and clarification --- lib/matplotlib/axes/_axes.py | 22 ++++++++++------------ lib/matplotlib/cbook.py | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 596fbfcfa03..4c2a6d8f963 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3068,8 +3068,8 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, meanprops=None, capprops=None, whiskerprops=None, manage_xticks=True, autorange=False): - Make a box and whisker plot for each column of *x* or each - vector in sequence *x*. The box extends from the lower to + Make a box and whisker plot for each column of ``x`` or each + vector in sequence ``x``. The box extends from the lower to upper quartile values of the data, with a line at the median. The whiskers extend from the box to show the range of the data. Flier points are those past the end of the whiskers. @@ -3099,12 +3099,10 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, this to an ascending sequence of percentile (e.g., [5, 95]) to set the whiskers at specific percentiles of the data. Finally, ``whis`` can be the string ``'range'`` to force the - whiskers to the min and max of the data. In the edge case - that the 25th and 75th percentiles are equivalent, *whis* - will be automatically set to ``'range'``. + whiskers to the min and max of the data. bootstrap : int, optional Specifies whether to bootstrap the confidence intervals - around the median for notched boxplots. If bootstrap==None, + around the median for notched boxplots. If `bootstrap` is None, no bootstrapping is performed, and notches are calculated using a Gaussian-based asymptotic approximation (see McGill, R., Tukey, J.W., and Larsen, W.A., 1978, and Kendall and @@ -3115,13 +3113,13 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, usermedians : array-like, optional An array or sequence whose first dimension (or length) is compatible with ``x``. This overrides the medians computed - by matplotlib for each element of *usermedians* that is not - `None`. When an element of *usermedians* == None, the median + by matplotlib for each element of ``usermedians`` that is not + `None`. When an element of ``usermedians`` is None, the median will be computed by matplotlib as normal. conf_intervals : array-like, optional Array or sequence whose first dimension (or length) is compatible with ``x`` and whose second dimension is 2. When - the current element of ``conf_intervals`` is not None, the + the an element of ``conf_intervals`` is not None, the notch locations computed by matplotlib are overridden (provided ``notch`` is `True`). When an element of ``conf_intervals`` is `None`, the notches are computed by the @@ -3156,12 +3154,12 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, Additional Options --------------------- - The following boolean options toogle the drawing of individual + The following boolean options toggle the drawing of individual components of the boxplots: - showcaps: the caps on the ends of whiskers (default is True) - showbox: the central box (default is True) - - showfliers: the outlierd beyone the caps (default is True) + - showfliers: the outliers beyond the caps (default is True) - showmeans: the arithmetic means (default is False) The remaining options can accept dictionaries that specify the @@ -3185,7 +3183,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, and the median's confidence intervals if enabled. - medians: horizonal lines at the median of each box. - whiskers: the vertical lines extending to the most extreme, - n-outlier data points. + non-outlier data points. - caps: the horizontal lines at the ends of the whiskers. - fliers: points representing data that extend beyond the whiskers (outliers). diff --git a/lib/matplotlib/cbook.py b/lib/matplotlib/cbook.py index 6e6e0b206e1..d3e8e767b85 100644 --- a/lib/matplotlib/cbook.py +++ b/lib/matplotlib/cbook.py @@ -1764,7 +1764,7 @@ def boxplot_stats(X, whis=1.5, autorange=False, bootstrap=None, labels=None): """ Returns list of dictionaries of statistics used to draw a series - of box and whisker plots. See the `Returns` section below to the + of box and whisker plots. The `Returns` section enumerates the required keys of the dictionary. Users can skip this function and pass a user-defined set of dictionaries to the new `axes.bxp` method instead of relying on MPL to do the calculations. From c887ad761ca53e1a9eac50fe04363c9e3dfc897d Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Thu, 18 Feb 2016 16:50:46 -0800 Subject: [PATCH 13/15] DOC: add whitespace around params --- lib/matplotlib/axes/_axes.py | 53 +++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 4c2a6d8f963..21fa636ba52 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -3078,17 +3078,21 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, ---------- x : Array or a sequence of vectors. The input data. + notch : bool, optional (False) If `True`, will produce a notched box plot. Otherwise, a rectangular boxplot is produced. + sym : str, optional The default symbol for flier points. Enter an empty string ('') if you don't want to show fliers. If `None`, then the fliers default to 'b+' If you want more control use the flierprops kwarg. + vert : bool, optional (True) If `True` (default), makes the boxes vertical. If `False`, everything is drawn horizontally. + whis : float, sequence, or string (default = 1.5) As a float, determines the reach of the whiskers past the first and third quartiles (e.g., Q3 + whis*IQR, @@ -3100,6 +3104,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, to set the whiskers at specific percentiles of the data. Finally, ``whis`` can be the string ``'range'`` to force the whiskers to the min and max of the data. + bootstrap : int, optional Specifies whether to bootstrap the confidence intervals around the median for notched boxplots. If `bootstrap` is None, @@ -3110,12 +3115,14 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, times to bootstrap the median to determine its 95% confidence intervals. Values between 1000 and 10000 are recommended. + usermedians : array-like, optional An array or sequence whose first dimension (or length) is compatible with ``x``. This overrides the medians computed by matplotlib for each element of ``usermedians`` that is not `None`. When an element of ``usermedians`` is None, the median will be computed by matplotlib as normal. + conf_intervals : array-like, optional Array or sequence whose first dimension (or length) is compatible with ``x`` and whose second dimension is 2. When @@ -3124,27 +3131,34 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, (provided ``notch`` is `True`). When an element of ``conf_intervals`` is `None`, the notches are computed by the method specified by the other kwargs (e.g., ``bootstrap``). + positions : array-like, optional Sets the positions of the boxes. The ticks and limits are automatically set to match the positions. Defaults to `range(1, N+1)` where N is the number of boxes to be drawn. + widths : scalar or array-like Sets the width of each box either with a scalar or a sequence. The default is 0.5, or ``0.15*(distance between extreme positions)``, if that is smaller. + patch_artist : bool, optional (False) If `False` produces boxes with the Line2D artist. Otherwise, boxes and drawn with Patch artists. + labels : sequence, optional Labels for each dataset. Length must be compatible with dimensions of ``x``. + manage_xticks : bool, optional (True) If the function should adjust the xlim and xtick locations. + autorange : bool, optional (False) When `True` and the data are distributed such that the 25th and 75th percentiles are equal, ``whis`` is set to ``'range'`` such that the whisker ends are at the minimum and maximum of the data. + meanline : bool, optional (False) If `True` (and ``showmeans`` is `True`), will try to render the mean as a line spanning the full width of the box @@ -3174,20 +3188,27 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, Returns ------- result : dict - A dictionary mapping each component of the boxplot - to a list of the :class:`matplotlib.lines.Line2D` - instances created. That dictionary has the following keys - (assuming vertical boxplots): - - - boxes: the main body of the boxplot showing the quartiles - and the median's confidence intervals if enabled. - - medians: horizonal lines at the median of each box. - - whiskers: the vertical lines extending to the most extreme, - non-outlier data points. - - caps: the horizontal lines at the ends of the whiskers. - - fliers: points representing data that extend beyond the - whiskers (outliers). - - means: points or lines representing the means. + A dictionary mapping each component of the boxplot to a list + of the :class:`matplotlib.lines.Line2D` instances + created. That dictionary has the following keys (assuming + vertical boxplots): + + - ``boxes``: the main body of the boxplot showing the + quartiles and the median's confidence intervals if + enabled. + + - ``medians``: horizontal lines at the median of each box. + + - ``whiskers``: the vertical lines extending to the most + extreme, non-outlier data points. + + - ``caps``: the horizontal lines at the ends of the + whiskers. + + - ``fliers``: points representing data that extend beyond + the whiskers (fliers). + + - ``means``: points or lines representing the means. Examples -------- @@ -3448,10 +3469,10 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True, quartiles and the median's confidence intervals if enabled. - - ``medians``: horizonal lines at the median of each box. + - ``medians``: horizontal lines at the median of each box. - ``whiskers``: the vertical lines extending to the most - extreme, n-outlier data points. + extreme, non-outlier data points. - ``caps``: the horizontal lines at the ends of the whiskers. From a99c0236e4b6306350d92468cfb8513b531b3afc Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Sun, 13 Mar 2016 15:51:19 -0700 Subject: [PATCH 14/15] API: moved new autorange opt to the end of fxn sig --- lib/matplotlib/cbook.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/matplotlib/cbook.py b/lib/matplotlib/cbook.py index d3e8e767b85..67309a6c610 100644 --- a/lib/matplotlib/cbook.py +++ b/lib/matplotlib/cbook.py @@ -1760,8 +1760,8 @@ def delete_masked_points(*args): return margs -def boxplot_stats(X, whis=1.5, autorange=False, bootstrap=None, - labels=None): +def boxplot_stats(X, whis=1.5, bootstrap=None, labels=None, + autorange=False): """ Returns list of dictionaries of statistics used to draw a series of box and whisker plots. The `Returns` section enumerates the @@ -1774,6 +1774,7 @@ def boxplot_stats(X, whis=1.5, autorange=False, bootstrap=None, X : array-like Data that will be represented in the boxplots. Should have 2 or fewer dimensions. + whis : float, string, or sequence (default = 1.5) As a float, determines the reach of the whiskers past the first and third quartiles (e.g., Q3 + whis*IQR, QR = interquartile @@ -1785,18 +1786,21 @@ def boxplot_stats(X, whis=1.5, autorange=False, bootstrap=None, minimum and maximum of the data. In the edge case that the 25th and 75th percentiles are equivalent, `whis` can be automatically set to ``'range'`` via the `autorange` option. - autorange : bool, optional (False) - When `True` and the data are distributed such that the 25th and - 75th percentiles are equal, ``whis`` is set to ``'range'`` such - that the whisker ends are at the minimum and maximum of the - data. + bootstrap : int, optional Number of times the confidence intervals around the median should be bootstrapped (percentile method). + labels : array-like, optional Labels for each dataset. Length must be compatible with dimensions of `X`. + autorange : bool, optional (False) + When `True` and the data are distributed such that the 25th and + 75th percentiles are equal, ``whis`` is set to ``'range'`` such + that the whisker ends are at the minimum and maximum of the + data. + Returns ------- bxpstats : list of dict From 6fe8a72363ffb192f517511716e26eacfd277b4b Mon Sep 17 00:00:00 2001 From: Paul Hobson Date: Sun, 13 Mar 2016 23:42:09 -0700 Subject: [PATCH 15/15] DOC: add api-change file describing new autorange behavior --- doc/api/api_changes/2016-03-13-PMH.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/api/api_changes/2016-03-13-PMH.rst diff --git a/doc/api/api_changes/2016-03-13-PMH.rst b/doc/api/api_changes/2016-03-13-PMH.rst new file mode 100644 index 00000000000..209df726cd0 --- /dev/null +++ b/doc/api/api_changes/2016-03-13-PMH.rst @@ -0,0 +1,10 @@ +Changed default ``autorange`` behavior in boxplots +`````````````````````````````````````````````````` + +Prior to v1.5.2, the whiskers of boxplots would extend to the mininum +and maximum values if the quartiles were all equal (i.e., Q1 = median += Q3). This behavior has been disabled by default to restore consistency +with other plotting packages. + +To restore the old behavior, simply set ``autorange=True`` when +calling ``plt.boxplot``.