r""" Return a list of dictionaries of statistics used to draw a series of box and whisker plots using `~.Axes.bxp`. Parameters ---------- X : array-like Data that will be represented in the boxplots. Should have 2 or fewer dimensions. whis : float or (float,
(X, whis=1.5, bootstrap=None, labels=None, autorange=False)
| 1151 | |
| 1152 | |
| 1153 | def boxplot_stats(X, whis=1.5, bootstrap=None, labels=None, autorange=False): |
| 1154 | r""" |
| 1155 | Return a list of dictionaries of statistics used to draw a series of box |
| 1156 | and whisker plots using `~.Axes.bxp`. |
| 1157 | |
| 1158 | Parameters |
| 1159 | ---------- |
| 1160 | X : array-like |
| 1161 | Data that will be represented in the boxplots. Should have 2 or |
| 1162 | fewer dimensions. |
| 1163 | |
| 1164 | whis : float or (float, float), default: 1.5 |
| 1165 | The position of the whiskers. |
| 1166 | |
| 1167 | If a float, the lower whisker is at the lowest datum above |
| 1168 | ``Q1 - whis*(Q3-Q1)``, and the upper whisker at the highest datum below |
| 1169 | ``Q3 + whis*(Q3-Q1)``, where Q1 and Q3 are the first and third |
| 1170 | quartiles. The default value of ``whis = 1.5`` corresponds to Tukey's |
| 1171 | original definition of boxplots. |
| 1172 | |
| 1173 | If a pair of floats, they indicate the percentiles at which to draw the |
| 1174 | whiskers (e.g., (5, 95)). In particular, setting this to (0, 100) |
| 1175 | results in whiskers covering the whole range of the data. |
| 1176 | |
| 1177 | In the edge case where ``Q1 == Q3``, *whis* is automatically set to |
| 1178 | (0, 100) (cover the whole range of the data) if *autorange* is True. |
| 1179 | |
| 1180 | Beyond the whiskers, data are considered outliers and are plotted as |
| 1181 | individual points. |
| 1182 | |
| 1183 | bootstrap : int, optional |
| 1184 | Number of times the confidence intervals around the median |
| 1185 | should be bootstrapped (percentile method). |
| 1186 | |
| 1187 | labels : list of str, optional |
| 1188 | Labels for each dataset. Length must be compatible with |
| 1189 | dimensions of *X*. |
| 1190 | |
| 1191 | autorange : bool, optional (False) |
| 1192 | When `True` and the data are distributed such that the 25th and 75th |
| 1193 | percentiles are equal, ``whis`` is set to (0, 100) such that the |
| 1194 | whisker ends are at the minimum and maximum of the data. |
| 1195 | |
| 1196 | Returns |
| 1197 | ------- |
| 1198 | list of dict |
| 1199 | A list of dictionaries containing the results for each column |
| 1200 | of data. Keys of each dictionary are the following: |
| 1201 | |
| 1202 | ======== =================================== |
| 1203 | Key Value Description |
| 1204 | ======== =================================== |
| 1205 | label tick label for the boxplot |
| 1206 | mean arithmetic mean value |
| 1207 | med 50th percentile |
| 1208 | q1 first quartile (25th percentile) |
| 1209 | q3 third quartile (75th percentile) |
| 1210 | iqr interquartile range |
nothing calls this directly
no test coverage detected
searching dependent graphs…