def bootstrap_plot(series, fig=None, size=<NUM_LIT:50>, samples=<NUM_LIT>, **kwds):
import random<EOL>import matplotlib.pyplot as plt<EOL>data = list(series.values)<EOL>samplings = [random.sample(data, size) for _ in range(samples)]<EOL>means = np.array([np.mean(sampling) for sampling in samplings])<EOL>medians = np.array([np.median(sampling) for sampling in samplings])<EOL>midranges = np.array([(min(sampling) + max(sampling)) * <NUM_LIT:0.5><EOL>for sampling in samplings])<EOL>if fig is None:<EOL><INDENT>fig = plt.figure()<EOL><DEDENT>x = lrange(samples)<EOL>axes = []<EOL>ax1 = fig.add_subplot(<NUM_LIT:2>, <NUM_LIT:3>, <NUM_LIT:1>)<EOL>ax1.set_xlabel("<STR_LIT>")<EOL>axes.append(ax1)<EOL>ax1.plot(x, means, **kwds)<EOL>ax2 = fig.add_subplot(<NUM_LIT:2>, <NUM_LIT:3>, <NUM_LIT:2>)<EOL>ax2.set_xlabel("<STR_LIT>")<EOL>axes.append(ax2)<EOL>ax2.plot(x, medians, **kwds)<EOL>ax3 = fig.add_subplot(<NUM_LIT:2>, <NUM_LIT:3>, <NUM_LIT:3>)<EOL>ax3.set_xlabel("<STR_LIT>")<EOL>axes.append(ax3)<EOL>ax3.plot(x, midranges, **kwds)<EOL>ax4 = fig.add_subplot(<NUM_LIT:2>, <NUM_LIT:3>, <NUM_LIT:4>)<EOL>ax4.set_xlabel("<STR_LIT>")<EOL>axes.append(ax4)<EOL>ax4.hist(means, **kwds)<EOL>ax5 = fig.add_subplot(<NUM_LIT:2>, <NUM_LIT:3>, <NUM_LIT:5>)<EOL>ax5.set_xlabel("<STR_LIT>")<EOL>axes.append(ax5)<EOL>ax5.hist(medians, **kwds)<EOL>ax6 = fig.add_subplot(<NUM_LIT:2>, <NUM_LIT:3>, <NUM_LIT:6>)<EOL>ax6.set_xlabel("<STR_LIT>")<EOL>axes.append(ax6)<EOL>ax6.hist(midranges, **kwds)<EOL>for axis in axes:<EOL><INDENT>plt.setp(axis.get_xticklabels(), fontsize=<NUM_LIT:8>)<EOL>plt.setp(axis.get_yticklabels(), fontsize=<NUM_LIT:8>)<EOL><DEDENT>return fig<EOL>
Bootstrap plot on mean, median and mid-range statistics.

The bootstrap plot is used to estimate the uncertainty of a statistic
by relaying on random sampling with replacement [1]_. This function will
generate bootstrapping plots for mean, median and mid-range statistics
for the given number of samples of the given size.

.. [1] "Bootstrapping (statistics)" in \
https://en.wikipedia.org/wiki/Bootstrapping_%28statistics%29

Parameters
----------
series : pandas.Series
    Pandas Series from where to get the samplings for the bootstrapping.
fig : matplotlib.figure.Figure, default None
    If given, it will use the `fig` reference for plotting instead of
    creating a new one with default parameters.
size : int, default 50
    Number of data points to consider during each sampling. It must be
    greater or equal than the length of the `series`.
samples : int, default 500
    Number of times the bootstrap procedure is performed.
**kwds :
    Options to pass to matplotlib plotting method.

Returns
-------
matplotlib.figure.Figure
    Matplotlib figure.

See Also
--------
DataFrame.plot : Basic plotting for DataFrame objects.
Series.plot : Basic plotting for Series objects.

Examples
--------

.. plot::
        :context: close-figs

        >>> s = pd.Series(np.random.uniform(size=100))
        >>> fig = pd.plotting.bootstrap_plot(s)  # doctest: +SKIP