Re: Filling area under a curve

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Thu, 8 Jun 2006 14:09:32 +0200 (CEST)

On Thu, 8 Jun 2006, Alexander Wagner wrote:

> On Thu, Jun 08, 2006 at 12:19:52PM +0200, Alexander Wagner wrote:
>
> 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)
> >
> > Sometimes it can be so simple, that one doesn't see it
> > anymore. Thanks very much!
>
> Sorry again, but it has a drawback I found now that I was
> composing my graphs. This exclusion area is meant to be
> layed on top of another graph, but unfortunately root fills
> the upper part in white rather than leaving it transparent.
> So I get the exclusion area once I lay it on top of the data
> the latter is covered. :( So this does not work out yet. If
> you have an idea how that could be accomplished I'd be
> thankful.

Rather than using an histogram to draw this area, I think a Filled Smooth TGraph or a simple Polygon would be simpler.

-- 
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 - 14:09:38 MEST

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