Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [Matplotlib-users] prctile not interpolating

 [Matplotlib-users] prctile not interpolating From: David Simpson - 2008-03-28 10:52:54 ```I would like to find percentiles, with interpolation where needed, but the matplotlib prctile seems to be different to matlab in this respect: In [1]: x = array([ 3.0, 5.0, 7.0, 8.0, 9.0, 11.0 ]) In [2]: median(x) Out[2]: 7.5 In [3]: prctile(x,50) Out[3]: 8.0 is there a function available which does include interpolation, or should I just write my own? (I'd also like 10th and 90th percentiles for example). Thanks, Dave ```

 [Matplotlib-users] prctile not interpolating From: David Simpson - 2008-03-28 10:52:54 ```I would like to find percentiles, with interpolation where needed, but the matplotlib prctile seems to be different to matlab in this respect: In [1]: x = array([ 3.0, 5.0, 7.0, 8.0, 9.0, 11.0 ]) In [2]: median(x) Out[2]: 7.5 In [3]: prctile(x,50) Out[3]: 8.0 is there a function available which does include interpolation, or should I just write my own? (I'd also like 10th and 90th percentiles for example). Thanks, Dave ```
 Re: [Matplotlib-users] prctile not interpolating From: Lionel Roubeyrie - 2008-03-28 11:13:11 ```You can use the scipy version: |~|[10]>from scipy.stats import stats |~|[11]>stats.scoreatpercentile(x,50) Out [11]:7.5 Le vendredi 28 mars 2008, David Simpson a écrit : > I would like to find percentiles, with interpolation where needed, but > the matplotlib prctile seems to be different to matlab in this respect: > > In [1]: x = array([ 3.0, 5.0, 7.0, 8.0, 9.0, 11.0 ]) > > In [2]: median(x) > Out[2]: 7.5 > > In [3]: prctile(x,50) > Out[3]: 8.0 > > > is there a function available which does include interpolation, or > should I just write my own? (I'd also like 10th and 90th percentiles for > example). > > Thanks, Dave > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplac >e _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Lionel Roubeyrie - lroubeyrie@... Chargé d'études et de maintenance LIMAIR - la Surveillance de l'Air en Limousin http://www.limair.asso.fr ```