# Exclusion Area in 2d

From: Alexander Wagner <a.wagner_at_physik.uni-wuerzburg.de>
Date: Fri, 25 Aug 2006 14:00:28 +0200

Hi!

>From some calculation I've two dataset of x,y,z values. Now
set 1 defines an exclusion area of set 2 and I want to draw those both in one plot. I've valid TGraph2D ojects and I try the following:

gr1 = TGraph2D("excl.dta");
gr2 = TGraph2D("data.dta");

// Get the first contour of gr2 and store it's TGraph object in gr2c    Double_t levels[1]; levels[0] = 100.;    gr2->GetHistogram()->SetContour(1, levels);    gr2->Draw("cont,list");
c1->Update();
TObjArray *contours =

```      (TObjArray*)gROOT->GetListOfSpecials()->FindObject("contours");
TList *lcontour1 = (TList*)contours->At(0);
TGraph *gc2 = (TGraph*)lcontour1->First();

```

This is nearly straight from thre root manuals and I indeed get the 100% countour in question as a TGraph-Object. All is well. This graph is nearly a rectangle. Now I try to superimpose both:

c2 = new TCanvas("c2","canvas",200,10,xdim,ydim);

gr1->Draw("cont1");
gc2->Draw("l,same");

Unfortunately gc2 fills "the wrong side" of the rectangle. According to the manual I should use something like

gc2->SetLineWidth(-9901);

to fill the other side, ie. the outer frame. But this does not really work out.

What am I doing wrong here? Or is the problme, that my exclusion area is a closed curve? (I use a construct like the above in other context where it works but the exclusion area is no closed curve.)

```--

Kind regards,                /                 War is Peace.
|            Freedom is Slavery.
Alexander Wagner            |         Ignorance is Strength.
|
| Theory     : G. Orwell, "1984"
/  In practice:   USA, since 2001
```
Received on Fri Aug 25 2006 - 14:00:38 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET