From: Charles R. T. <ct...@gm...> - 2006-11-12 07:58:47
|
> If I'm right, then the assertion in bar() is misformed. I'd suggest the following. Works for me, anyway. :-) if yerr is not None: assert (len(yerr)==nbars or (len(yerr)==2 and len(yerr[0])==len(yerr[1])==nbars)), 'bar() argument \'yerr\' must be len(%s) (or a pair of such) or scalar' % lenarg if xerr is not None: assert (len(xerr)==nbars or (len(xerr)==2 and len(xerr[0])==len(xerr[1])==nbars)), 'bar() argument \'xerr\' must be len(%s) (or a pair of such) or scalar' % lenarg > -C > > On 11/6/06, John Hunter <jdh...@ni...> wrote: > > >>>>> "Charles" == Charles R Twardy <ct...@gm...> writes: > > > > Charles> Hi folks, It seems that 'bar' no longer supports > > Charles> asymmetric errorbars. Am I meant to call both 'bar' and > > Charles> 'errorbar' if I want asymmetric errorbars on my > > Charles> histograms? Is there a canonical idiom? > > > > Charles> Sorry if I missed a previous answer to this. > > > > I don't use asymmetric error bars so don't have any ready test code, > > but looking at the implementation, the xerr and yerr kwargs to bar are > > passed on to errorbar after a bit of array conversion and length > > checking. Does this not work for you? If not, can you send a snippet > > of freestanding test code? > > > > Thanks, > > JDH > > > > > -- > Charles R. Twardy > -- Charles R. Twardy |