From: Johannes Radinger <JR<adinger@gm...>  20110610 12:15:16

Hello, I know that it is possible to fill an area between to curves (functions) with "fill between". In my case I've got let's say 10 curves of different shape. I'd like to fill the area between the most upper lines and the most lower lines. Is that somehow possible? One workaround which appeared in my mind was to use fillbetween for all possible combinations of 2 functions out of the 10, but thats somehow stupid work if there is another possibility... I hope a made myself clear enough...and hopefully you can help me. /Johannes  NEU: FreePhone  kostenlos mobil telefonieren! Jetzt informieren: http://www.gmx.net/de/go/freephone 
From: Sebastian Berg <sebastian@si...>  20110610 12:40:46

On Fri, 20110610 at 14:15 +0200, Johannes Radinger wrote: > Hello, > > I know that it is possible to fill an area between to curves (functions) with "fill between". > > In my case I've got let's say 10 curves of different shape. I'd like to fill the area between the most upper lines and the most lower lines. Is that somehow possible? One workaround which appeared in my mind was to use fillbetween for all possible combinations of 2 functions out of the 10, but thats somehow stupid work if there is another possibility... > > I hope a made myself clear enough...and hopefully you can help me. > > /Johannes Hi, use numpy to calculate the upper and lower limits first? curves = np.random.randn(1000, 10) plt.fill_between(np.arange(1000), curves.min(1), curves.max(1)) of course if the x values ar enot all the same you will have to interpolate... Regards, Sebastian 
From: Johannes Radinger <JR<adinger@gm...>  20110610 13:31:55

 OriginalNachricht  > Datum: Fri, 10 Jun 2011 14:40:17 +0200 > Von: Sebastian Berg <sebastian@...> > An: Johannes Radinger <JRadinger@...> > CC: matplotlibusers@... > Betreff: Re: [Matplotlibusers] fillbetween special demand > On Fri, 20110610 at 14:15 +0200, Johannes Radinger wrote: > > Hello, > > > > I know that it is possible to fill an area between to curves (functions) > with "fill between". > > > > In my case I've got let's say 10 curves of different shape. I'd like to > fill the area between the most upper lines and the most lower lines. Is > that somehow possible? One workaround which appeared in my mind was to use > fillbetween for all possible combinations of 2 functions out of the 10, but > thats somehow stupid work if there is another possibility... > > > > I hope a made myself clear enough...and hopefully you can help me. > > > > /Johannes > > Hi, > > use numpy to calculate the upper and lower limits first? > > curves = np.random.randn(1000, 10) > plt.fill_between(np.arange(1000), curves.min(1), curves.max(1)) hmm. I am not sure what you mean exactly. In my case i've got following function: def pdf(x,s1,s2,p): return (p/(math.sqrt(2*math.pi*s1**2))*numpy.exp(((x0)**(2)/(2*s1**(2)))))+((1p)/(math.sqrt(2*math.pi*s2**2))*numpy.exp(((x0)**(2)/(2*s2**(2))))) and s1,s2 and p are varying... so i have a list like 123, 3215, 0.3 152, 2351, 0.4 521, 4351, 0.6 ... for these three parameters. So the resulting curves are probably intersecting each other and are of different shape. so two questions: 1) what is the best way to supply this list to produce the single curves (about 10) 2) how can I do the fill between to get the "range" of the curves. Maybe you can give me a more detailed example. Thanks /Johannes > > of course if the x values ar enot all the same you will have to > interpolate... > > Regards, > > Sebastian >  NEU: FreePhone  kostenlos mobil telefonieren! Jetzt informieren: http://www.gmx.net/de/go/freephone 