title: matplotlib bar with asymmetrical error bars
body: <p>I need to plot a bar graph with asymmetrical error bars... </p>
  
  <p>The documentation of the matplotlib.pyplot.bar function says:</p>
  
  <blockquote>
    <p>Detail: xerr and yerr are passed directly to
    errorbar(), so they can also have shape 2xN for independent
    specification of lower and upper errors.</p>
  </blockquote>
  
  <p>But, I can not give an 2xN array to the yerr...</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  plt.bar(xrange(5), [2,5,3,4,7], yerr=[[1,4,2,3,6],[4,10,6,8,14]]) #DO NOT work!
  </code></pre>
  
  <p>And show me the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "bar_stacked.py", line 9, in &lt;module&gt;
      plt.bar(xrange(5), [2,5,3,4,7], yerr=[[1,4,2,3,6],[4,10,6,8,14]])
    File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 1742, in bar
      ret = ax.bar(left, height, width, bottom, color, edgecolor, linewidth, yerr, xerr, ecolor, capsize, align, orientation, log, **kwargs)
    File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 4253, in bar
      "incompatible sizes: bar() argument 'yerr' must be len(%s) or scalar" % nbars)
  ValueError: incompatible sizes: bar() argument 'yerr' must be len(5) or scalar
  </code></pre>
  
  <p>But, instead this function:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  plt.errorbar(xrange(5), [2,5,3,4,7], yerr=[[1,4,2,3,6],[4,10,6,8,14]])
  </code></pre>
  
  <p>Works fine.</p>
  
  <p>Does the matplotlib.pyplot.bar no longer support the 2xN arrays for yerr?
  If the answere is yes... How can I plot a bar graph with asymmetrical error bars?</p>
  
  <p>Thanks for your time! </p>