@@ -3033,11 +3033,16 @@ def box(self, by=None, **kwds):
3033
3033
r"""
3034
3034
Make a box plot of the DataFrame columns.
3035
3035
3036
- This method draws a box and whisker for each series in the DataFrame
3037
- in a single chart. The boxes share the vertical axis, which
3038
- makes makes it easier to compare if they are similar in scale.
3039
- Box plots are useful because they clearly show the median,
3040
- quartiles and flier points in the data.
3036
+ A box plot is a method for graphically depicting
3037
+ groups of numerical data through their quartiles.
3038
+ The box extends from the Q1 to Q3 quartile values of the data,
3039
+ with a line at the median (Q2). The whiskers extend from the edges
3040
+ of box to show the range of the data. The position of the whiskers
3041
+ is set by default to 1.5*IQR (IQR = Q3 - Q1) from the edges of the
3042
+ box. Outlier points are those past the end of the whiskers.
3043
+
3044
+ For further details see Wikipedia's
3045
+ entry for `boxplot <https://en.wikipedia.org/wiki/Box_plot>`_.
3041
3046
3042
3047
A consideration when using this chart is that the box and the whiskers
3043
3048
can overlap, which is very common when plotting small sets of data.
@@ -3056,9 +3061,9 @@ def box(self, by=None, **kwds):
3056
3061
3057
3062
See Also
3058
3063
--------
3059
- :meth:` pandas.DataFrame.boxplot` : Another method to draw a box plot.
3060
- :meth:` pandas.Series.plot.box` : Draw a box plot from a Series object.
3061
- :func:` matplotlib.pyplot.boxplot` : Draw a box plot in matplotlib.
3064
+ pandas.DataFrame.boxplot: Another method to draw a box plot.
3065
+ pandas.Series.plot.box: Draw a box plot from a Series object.
3066
+ matplotlib.pyplot.boxplot: Draw a box plot in matplotlib.
3062
3067
3063
3068
Examples
3064
3069
--------
@@ -3068,7 +3073,7 @@ def box(self, by=None, **kwds):
3068
3073
.. plot::
3069
3074
:context: close-figs
3070
3075
3071
- >>> data = np.random.randint(0, 10, size=( 25, 4) )
3076
+ >>> data = np.random.randn( 25, 4)
3072
3077
>>> df = pd.DataFrame(data, columns=list('ABCD'))
3073
3078
>>> plot = df.plot.box()
3074
3079
"""
0 commit comments