Re: 2d histogram (scatter plot)

From: Rene Brun <brun_at_pcroot.cern.ch>
Date: Fri, 17 Jun 2005 15:37:04 +0200 (MEST)


Just do

   tree.Draw("var1:var2>>h1","my cut1")
   tree.Draw("var1:var2>>h2","my cut2","same")

This is explained in the Users Guide and at http://root.cern.ch/root/htmldoc/TTreePlayer.html#TTreePlayer:DrawSelect

see also the many tutorials on this subject.

Rene Brun

On
Fri, 17 Jun 2005, Muhammad
Saleem
wrote:

>
> Hi Rene
>
> Well I have the original info in a tree where i applied slightly different
> cuts.
>
> Because I did not find any thing where I can plot the two variables as a
> 2D histo with slightly different cuts.
>
> Is there any thing or you are suggesting that I should create a tree from
> these h1 and h2 which i created from a tree with 2 slightly different set
> of cuts.
>
> cheers
>
> -S-
>
> On Fri, 17 Jun 2005, Rene Brun wrote:
>> This would be like creation of energy from vacuum.
>
>> You must have the original values to be able to see the correlations.
>> Start from a TTree.
>
>> Rene Brun
>
> On Fri, 17 Jun 2005, Muhammad Saleem wrote:
>
>>
>> Hi folks
>>
>> This might be very basic thing in root,but sorry I could not find this.
>>
>> I have 2 histgrams filled , h1 and h2
>>
>> I want to plot a 2D histogram from them:
>> like
>>
>> h1:h2
>>
>> This was easy if they are in a tree.
>>
>> Any one have some idea?
>>
>> cheers
>>
>> -S-
>>
>
Received on Fri Jun 17 2005 - 15:37:09 MEST

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