Re: Filling area under a curve

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Thu, 8 Jun 2006 12:04:38 +0200 (CEST)

Hi,

 The low let part is left empty. The upper part of the contour is drawn (to draw a filled contour you need two contours at least). A simple way to obtain what you need is to "invert" your function. Instead of returning "z" return (xmax*xmax+ymax*ymax-z) and instead of drawing the level "excl" draw the level (xmax*xmax+ymax*ymax-excl)

O.Couet

 On Thu, 8 Jun 2006,
Alexander Wagner wrote:

> On Thu, Jun 08, 2006 at 10:49:31AM +0200, Olivier Couet wrote:
>
> Hi!
>
> > I suggested this approach because the description you made seemed close
> > to this new functionality,
>
> Yes. That's why I started compiling. ;)
>
> > but it may well be that you need something else. Can you
> > send me a small *running* example showing what you do ?
>
> Included. It's modeled exactly like my script, I just
> simplified the Function and droped cosmetics. If you execute
> it you'll see "the inverse" of what I'd need. That is the
> lower left corner is clear whereas the upper right is filled
> in black.
>
> > > > I have recently implemented this in TGraph. See
> > > > $ROOTSYS/tutorials/graphpolar.C
> > > > This has been introduced in the last ROOT release. See:
> > > > http://root.cern.ch/root/Version511.news.html
> > >
> > > Just finished compiling it and tried your example. But I do
> > > not see how to use it in my case. My problem is, that I have
> > > something like z=f(x,y) and the area that I want to shade is
> > > "everything below z=excl". Additionally I can not easily
> > > solve f(x,y) for x or y analytically. That's why I used a
> > > TH2F to raster the area. Did I miss something? Maybe there
> > > is a way to extract the proper contour line easily into
> > > arrays so I can fill it into a TGraph? Did I miss that?
> > >
> > > Thanks in advance!
>
>

-- 
Org:    CERN - European Laboratory for Particle Physics.
Mail:   1211 Geneve 23 - Switzerland                     Mailbox: J25910      
E-Mail: Olivier.Couet_at_cern.ch                            Phone:   +41 22 7676522
WWW:    http://cern.ch/Olivier.Couet/                    Fax:     +41 22 7670300
Received on Thu Jun 08 2006 - 12:04:44 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:58 MET