Hi Tom,

Thank you very much for your answer. Indeed this solves my problem. 
However, I was wondering if the documentation on this is correct.
At 
http://matplotlib.org/api/axes_api.html?highlight=errorbar#matplotlib.axes.Axes.errorbar
 
it says:

xerr/yerr: [ scalar | N, Nx1, or 2xN array-like ]
If a scalar number, len(N) array-like object, or an Nx1 array-like 
object, errorbars are drawn +/- value.
If a sequence of shape 2xN, errorbars are drawn at -row1 and +row2

This sounds to me that for a 2xN argument it should be drawn from the 
actual supplied value, or would you interpret this differently?

Thanks,
Markus

Am 2013-02-08 22:02, schrieb Thomas Caswell:
> The bar is drawn from `y - yerr_low` to `y + yerr_upp`
>
> ax.errorbar(x + .5,y,yerr=[[y - yerr_low],[yerr_upp -
> y]],fmt='s',markersize=4)
>
> will get you what you want.
>
> Tom
>
> On Fri, Feb 8, 2013 at 8:41 PM, Markus Haider <markus.hai...@uibk.ac.at> 
> wrote:
>> Hi,
>>
>> I think I have a problem with errorbars in a log plot. The problem is
>> reproducible through the enclosed errorbar_log.py file. As you can see I
>> plot a point with y = 10**(-5) and I want the errorbars drawn from
>> 10**(-5.5) to 10**(-4.5) which should be symmetric in this plot but isn't.
>>
>> Here is the content of my errorbar_log.py file:
>>
>> #!/usr/bin/python
>> import numpy as np
>> import matplotlib.pyplot as plt
>>
>> fig = plt.figure()
>> ax = fig.add_subplot(111)
>> x = 0.0
>> y = 10**(-5.0)
>> yerr_low = 10**(-5.5)
>> yerr_upp = 10**(-4.5)
>> ax.errorbar(x,y,yerr=[[yerr_low],[yerr_upp]],fmt='o',markersize=4)
>> ax.set_xlim(-1.0,1.0)
>> ax.set_ylim(1E-6,1E-3)
>> ax.set_yscale('log')
>> plt.savefig('errorbar.png')
>>
>> ---------------------------------------------
>>
>> 10**(-5.5) = 3.162277660168379e-06
>> and 10**(-4.5) = 3.1622776601683795e-05
>>
>> but you can see that the lower boundary is not at the calculated value.
>> <http://matplotlib.1069221.n5.nabble.com/file/n40412/errorbar.png>
>>
>>
>> Do I misunderstand the behaviour of the errorbar function or is this a bug?
>>
>> Cheers,
>> Markus
>>
>>
>>
>> --
>> View this message in context: 
>> http://matplotlib.1069221.n5.nabble.com/Errorbar-problem-tp40412.html
>> Sent from the matplotlib - devel mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Free Next-Gen Firewall Hardware Offer
>> Buy your Sophos next-gen firewall before the end March 2013
>> and get the hardware for free! Learn more.
>> http://p.sf.net/sfu/sophos-d2d-feb
>> _______________________________________________
>> Matplotlib-devel mailing list
>> Matplotlib-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
> --
> Thomas Caswell
> tcasw...@gmail.com
>


------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to