title: Why is matplotlib's notched boxplot folding back on itself?
body: <p>I tried to make a notched boxplot using matplotlib, but found the notched box tends to overextend and then fold back on itself. This does not happen when I make a regular boxplot. </p>
  
  <p>This can be seen with the following code and the resulting plot that gets generated:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  data = [[-0.056, -0.037, 0.010, 0.077, 0.082],
          [-0.014, 0.021, 0.051, 0.073, 0.079]]
  
  # Set 2 plots with vertical layout (1 on top of other)
  fig, (ax1, ax2) = plt.subplots(2, 1, sharex=True)
  
  ax1.boxplot(data, 1) #Notched boxplot
  ax2.boxplot(data, 0) #Standard boxplot
  
  ax1.set_ylim([-0.1, 0.1])
  ax2.set_ylim([-0.1, 0.1])
  
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/DTvDw.png" rel="noreferrer"><img src="https://i.stack.imgur.com/DTvDw.png" alt="Bad Notched Boxplot and Std. boxplot"></a></p>
  
  <p>Does anyone know what I'm doing wrong and how I can fix this?</p>