# matplotlib: missed errorbars in logarithmic plot

While manipulating some data I came across to, what looked, a strange behavior with the errorbar of matplotlib, when plotting the results from linear to logarithmic scale.

Suppose these data:

```import matplotlib.pyplot as plt import numpy as np```

``` ```

```s=[19.0, 20.0, 21.0, 22.0, 24.0] v=[36.5, 66.814250000000001, 130.17750000000001, 498.57466666666664, 19.41] verr=[0.28999999999999998, 80.075044597909169, 71.322124839818571, 650.11015891565125, 0.02] plt.errorbar(s,v,yerr=verr) plt.show() ```

and the result looked like this:

where the errorbars are obviously visible, but when I switched to the logarithmic scale, by using:

```plt.yscale('log') plt.show()```

```import matplotlib.pyplot as plt import numpy as np```
``` ```
```s=[19.0, 20.0, 21.0, 22.0, 24.0] v=np.array([36.5, 66.814250000000001, 130.17750000000001, 498.57466666666664, 19.41]) verr=np.array([0.28999999999999998, 80.075044597909169, 71.322124839818571, 650.11015891565125, 0.02]) verr2 = np.array(verr) verr2[np.where(v-verr<=.0)] = v[np.where(v-verr<=.0)]*.999999 plt.errorbar(s,v,yerr=[verr2,verr]) plt.ylim(1E1,1E4) plt.yscale('log') plt.show() ```