title: Error bars in a logarithmic scale plot with Python
body: <p>I'm working on a long code that produces the following <a href="https://imgur.com/jpdWWoq" rel="nofollow noreferrer">graph</a>.</p>
  
  <p>The problem is that the error bars change their length because of the logarithmic scale, and I would like all of them to appear equal to each other, that is, to have a fixed length. Is there any way to do this easily with Python?</p>
  
  <p><strong>Edit:</strong> Here is part of the code, where I generate the error bars.</p>
  
  <pre><code>faztec=[11.4,11.4,7.1,7.7,6.8,6.9,6.2,7.5,5.5,4.0,3.5,3.2,2.9,2.9]
  flaboca=[9.8,7.3,6.8,8.2,6.8,8.1,6.7,11.0,10.6,4.2,7.0,7.1,5.0,5.3]
  
  err1 = [1.5,1.5,1.7,1.8,1.4,1.5,1.7,3.0,2.7,1.4,1.9,1.9,1.4,1.8]
  err2 = [0.7,0.7,0.7,0.8,0.7,0.7,0.7,0.9,0.7,0.7,0.7,0.7,0.7,0.7]
  
  newErr1x = []
  newErr1y = []
  
  for i in range(0, len(y)):
      x1 = x[i]
      y1 = (flaboca[i]-err1[i])/(faztec[i]+err2[i])
      x2 = x[i]
      y2 = (flaboca[i]+err1[i])/(faztec[i]-err2[i])
      pl.plot([x1, x2], [y1, y2])
      correction = False
      # when end of segment is near 0, we must change it (because of logx)
      if x2 &lt; endBarLen:
          x2 = 0.03
          endBarLen = endBarLen / 10
          correction = True
      pl.plot([x1+endBarLen, x2-endBarLen], [y1, y1], '-k')
      pl.plot([x1+endBarLen, x2-endBarLen], [y2, y2], '-k')
      if correction:
          correction = False
          endBarLen = endBarLen*10
  pl.show()
  </code></pre>