-------- Original-Nachricht --------
> Datum: Fri, 10 Jun 2011 14:40:17 +0200
> Von: Sebastian Berg <sebast...@sipsolutions.net>
> An: Johannes Radinger <jradin...@gmx.at>
> CC: matplotlib-users@lists.sourceforge.net
> Betreff: Re: [Matplotlib-users] fill-between special demand

> On Fri, 2011-06-10 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 work-around which appeared in my mind was to use
> fill-between 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(-((x-0)**(2)/(2*s1**(2)))))+((1-p)/(math.sqrt(2*math.pi*s2**2))*numpy.exp(-((x-0)**(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

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to