Re: Contours superposition

From: Rene Brun <brun_at_pcroot.cern.ch>
Date: Sat, 7 May 2005 23:24:08 +0200 (MEST)


Jean-Eric,

What about the following; (assuming TH2 *h1, *h2)

int colors[2] = {2,4}; //red, blue
gStyle->SetPalette(2,colors);

h1->SetContour(2);
h1->SetContourLevel(0,level1);  //value for your first level
h1->SetContourLevel(1,1e6);     //non-existing high level
h1->Draw("cont1");
h2->SetContour(2);
h2->SetContourLevel(0,0);       //non existing low level
h2->SetContourLevel(1,level2);  //value for your second level 
h2->Draw("cont1 same");

Rene Brun

On Sat, 7
May
2005,
Jean-Eric Campagne wrote:

> Dear developpers,
>
> . I have 2 TH2Ds
> . for each one I make a Draw("CONT1") after setting the number of contours
> to 1 level
> . I would like to superpose the two results with a different color for each
> histogram with its 1-contour level.
>
> For the moment I do not manage. I have succeeded to superpose the two
> contours but they share the same palette so they have the same color!!!
>
> Can you help me, I have already spend 1/2 day for this stupid thing?
> I wander if PAW do not manage better...
>
> Regards
> Jean-Eric
> ...........................................................................
> .LAL - IN2P3 - CNRS
> .LAL - B.P 34 - 91898 Orsay Cedex - France
> .Piece 108
> .Tel +33 (0)1 64 46 84 29
> .Fax +33 (0)1 64 46 83 97
> ...........................................................................
>
>
Received on Sat May 07 2005 - 23:24:13 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:07 MET