Index: lib/matplotlib/axes.py
===================================================================
--- lib/matplotlib/axes.py      (revision 8092)
+++ lib/matplotlib/axes.py      (working copy)
@@ -4880,7 +4880,7 @@
         self.autoscale_view()
         return (l0, caplines, barcols)

-    def boxplot(self, x, notch=0, sym='b+', vert=1, whis=1.5,
+    def boxplot(self, x, notch=0, sym='b+', vert=1, whis=1.5, bsN=5000,
                 positions=None, widths=None, patch_artist=False):
         """
         call signature::
@@ -4909,6 +4909,10 @@
         *whis* (default 1.5) defines the length of the whiskers as
         a function of the inner quartile range.  They extend to the
         most extreme data point within ( ``whis*(75%-25%)`` ) data range.
+
+        *bsN* (default 5000) is the number of time to bootstrap the median
+        to determine it's 95% confidence intervals. Values between 1000
+        and 10000 are recommended.

         *positions* (default 1,2,...,n) sets the horizontal positions of
         the boxes. The ticks and limits are automatically set to match
@@ -4929,6 +4933,20 @@

         .. plot:: pyplots/boxplot_demo.py
         """
+        def bootstrapMedian(data, N=5000):
+
+            M = len(data)
+            percentile = [2.5,97.5]
+            estimate = np.zeros(N)
+            for n in range(N):
+                bsIndex = np.random.random_integers(0,M-1,M)
+                bsData = data[bsIndex]
+                estimate[n] = mlab.prctile(bsData, 50)
+
+            CI = mlab.prctile(estimate, percentile)
+
+            return CI
+
         if not self._hold: self.cla()
         holdStatus = self._hold
         whiskers, caps, boxes, medians, fliers = [], [], [], [], []
@@ -4973,6 +4991,7 @@
                 continue
             # get median and quartiles
             q1, med, q3 = mlab.prctile(d,[25,50,75])
+
             # get high extreme
             iq = q3 - q1
             hi_val = q3 + whis*iq
@@ -5021,8 +5040,10 @@
                 med_x = [box_x_min, box_x_max]
             # calculate 'notch' plot
             else:
-                notch_max = med + 1.57*iq/np.sqrt(row)
-                notch_min = med - 1.57*iq/np.sqrt(row)
+                # get conf. intervals around median
+                CI = bootstrapMedian(d, N=bsN)
+                notch_max = CI[1]
+                notch_min = CI[0]
                 # make our notched box vectors
                 box_x = [box_x_min, box_x_max, box_x_max, cap_x_max, box_x_max,
                          box_x_max, box_x_min, box_x_min, cap_x_min, box_x_min,