class_docstr: Box plot
  For each series, shows the median value, the 25th and 75th percentiles,
  and the values within
  1.5 times the interquartile range of the 25th and 75th percentiles.
  
  See http://en.wikipedia.org/wiki/Box_plot
docstr: Default mode: (mode='extremes' or unset)
      Return a 7-tuple of 2x minimum, Q1, Median, Q3,
  and 2x maximum for a list of numeric values.
  1.5IQR mode: (mode='1.5IQR')
      Return a 7-tuple of min, Q1 - 1.5 * IQR, Q1, Median, Q3,
  Q3 + 1.5 * IQR and max for a list of numeric values.
  Tukey mode: (mode='tukey')
      Return a 7-tuple of min, q[0..4], max and a list of outliers
  Outliers are considered values x: x < q1 - IQR or x > q3 + IQR
  SD mode: (mode='stdev')
      Return a 7-tuple of min, q[0..4], max and a list of outliers
  Outliers are considered values x: x < q2 - SD or x > q2 + SD
  SDp mode: (mode='pstdev')
      Return a 7-tuple of min, q[0..4], max and a list of outliers
  Outliers are considered values x: x < q2 - SDp or x > q2 + SDp
  
  The iterator values may include None values.
  
  Uses quartile definition from  Mendenhall, W. and
  Sincich, T. L. Statistics for Engineering and the
  Sciences, 4th ed. Prentice-Hall, 1995.
code: def _box_points(values, mode="extremes"):
      """
      Default mode: (mode='extremes' or unset)
          Return a 7-tuple of 2x minimum, Q1, Median, Q3,
      and 2x maximum for a list of numeric values.
      1.5IQR mode: (mode='1.5IQR')
          Return a 7-tuple of min, Q1 - 1.5 * IQR, Q1, Median, Q3,
      Q3 + 1.5 * IQR and max for a list of numeric values.
      Tukey mode: (mode='tukey')
          Return a 7-tuple of min, q[0..4], max and a list of outliers
      Outliers are considered values x: x < q1 - IQR or x > q3 + IQR
      SD mode: (mode='stdev')
          Return a 7-tuple of min, q[0..4], max and a list of outliers
      Outliers are considered values x: x < q2 - SD or x > q2 + SD
      SDp mode: (mode='pstdev')
          Return a 7-tuple of min, q[0..4], max and a list of outliers
      Outliers are considered values x: x < q2 - SDp or x > q2 + SDp
  
      The iterator values may include None values.
  
      Uses quartile definition from  Mendenhall, W. and
      Sincich, T. L. Statistics for Engineering and the
      Sciences, 4th ed. Prentice-Hall, 1995.
      """
  
      def median(seq):
          n = len(seq)
          if n % 2 == 0:  # seq has an even length
              return (seq[n // 2] + seq[n // 2 - 1]) / 2
          else:  # seq has an odd length
              return seq[n // 2]
  
      def mean(seq):
          return sum(seq) / len(seq)
  
      def stdev(seq):
          m = mean(seq)
          l = len(seq)
          v = sum((n - m) ** 2 for n in seq) / (l - 1)  # variance
          return v**0.5  # sqrt
  
      def pstdev(seq):
          m = mean(seq)
          l = len(seq)
          v = sum((n - m) ** 2 for n in seq) / l  # variance
          return v**0.5  # sqrt
  
      outliers = []
      # sort the copy in case the originals must stay in original order
      s = sorted([x for x in values if x is not None])
      n = len(s)
      if not n:
          return (0, 0, 0, 0, 0, 0, 0), []
      elif n == 1:
          return (s[0], s[0], s[0], s[0], s[0], s[0], s[0]), []
      else:
          q2 = median(s)
          # See 'Method 3' in http://en.wikipedia.org/wiki/Quartile
          if n % 2 == 0:  # even
              q1 = median(s[: n // 2])
              q3 = median(s[n // 2 :])
          else:  # odd
              if n == 1:  # special case
                  q1 = s[0]
                  q3 = s[0]
              elif n % 4 == 1:  # n is of form 4n + 1 where n >= 1
                  m = (n - 1) // 4
                  q1 = 0.25 * s[m - 1] + 0.75 * s[m]
                  q3 = 0.75 * s[3 * m] + 0.25 * s[3 * m + 1]
              else:  # n is of form 4n + 3 where n >= 1
                  m = (n - 3) // 4
                  q1 = 0.75 * s[m] + 0.25 * s[m + 1]
                  q3 = 0.25 * s[3 * m + 1] + 0.75 * s[3 * m + 2]
  
          iqr = q3 - q1
          min_s = s[0]
          max_s = s[-1]
          if mode == "extremes":
              q0 = min_s
              q4 = max_s
          elif mode == "tukey":
              # the lowest datum still within 1.5 IQR of the lower quartile,
              # and the highest datum still within 1.5 IQR of the upper
              # quartile [Tukey box plot, Wikipedia ]
              b0 = bisect_left(s, q1 - 1.5 * iqr)
              b4 = bisect_right(s, q3 + 1.5 * iqr)
              q0 = s[b0]
              q4 = s[b4 - 1]
              outliers = s[:b0] + s[b4:]
          elif mode == "stdev":
              # one standard deviation above and below the mean of the data
              sd = stdev(s)
              b0 = bisect_left(s, q2 - sd)
              b4 = bisect_right(s, q2 + sd)
              q0 = s[b0]
              q4 = s[b4 - 1]
              outliers = s[:b0] + s[b4:]
          elif mode == "pstdev":
              # one population standard deviation above and below
              # the mean of the data
              sdp = pstdev(s)
              b0 = bisect_left(s, q2 - sdp)
              b4 = bisect_right(s, q2 + sdp)
              q0 = s[b0]
              q4 = s[b4 - 1]
              outliers = s[:b0] + s[b4:]
          elif mode == "1.5IQR":
              # 1.5IQR mode
              q0 = q1 - 1.5 * iqr
              q4 = q3 + 1.5 * iqr
          return (min_s, q0, q1, q2, q3, q4, max_s), outliers
  
file_path: pygal/pygal/graph/box.py
imports: from bisect import bisect_left, bisect_right
  from pygal.graph.graph import Graph
  from pygal.util import alter, decorate
label_desc: Use image node_id 7 for calling the Box obj's underlying member method code with example usage: obj._box_points(values, mode) and returns: unknown, unknown, unknown, int,  int,  int,  int,  int,  int,  int,  list, unknown, seq, s,  s,  s,  s,  s,  s,  s,  list, min_s,  q0,  q1,  q2,  q3,  q4,  max_s,  outliers