RE: Two 1D histograms with statistics from both in one canvas

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Thu, 28 May 2009 15:40:24 +0200


Hi Philip,
I looked at the page you mentionned. I do not understand why you need "stat" and "nostat" has the histogram class already has SetStats(). I think THStack fullfill the other options you have. In the "Bugs" section you say that your code does not work in interpreted mode, surely there is something wrong .. it should work also. So I do not think we will take your code but if you prefer to use it instead of what is available in standard ROOT, that's fine with me. Cheers,
Olivier

-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Philip Rodrigues Sent: Thursday, May 28, 2009 3:13 PM
To: AJAY KUMAR DASH; roottalk_at_lxbuild091.cern.ch Subject: Re: [ROOT] Two 1D histograms with statistics from both in one canvas

I have a hack to do this automatically, by overriding THistPainter::Paint, which you might find useful. It's available at:

http://www-pnp.physics.ox.ac.uk/~rodriges/HistPainter/

Just grab mypainter.cxx and mypainter.h from that directory and follow the instructions in the read_me file. The testmypainter.C macro has some examples of how to use the histogram painter.

There are some other features that I find useful - it can automatically rescale the y axis to contain all plots when drawing with "same", and automatically recolour plots drawn with "same".

Regards,
Philip

Marc Escalier wrote:
>
> >Use the option SAMES instead of SAME
>
> Hi,
>
> the only inconvenient stuff with that, is that one need to move with the
> mouse the stat box. (And one could think that there is only one box
> created because they just are superposed). How technically to access to
> the box stat of each histogram and move it ?
>
> regards
>
> ==========
> Olivier Couet a écrit :

>>
>> Use the option SAMES instead of SAME
>>
>>  
>>
>> *From:* owner-roottalk_at_root.cern.ch 
>> [mailto:owner-roottalk_at_root.cern.ch] *On Behalf Of *AJAY KUMAR DASH
>> *Sent:* Thursday, May 28, 2009 1:04 PM
>> *To:* roottalk_at_pcroot.cern.ch
>> *Subject:* [ROOT] Two 1D histograms with statistics from both in one 
>> canvas
>>
>>  
>>
>> Hi,
>>
>>    Is there any way to plot two one dimensional histograms in one 
>> canvas with the statistic from both the histograms?
>> My problem is, it shows the statistics of one histogram only.  I would 
>> like to have statistic from both the histograms
>> in that canvas. Thanks in advance.
>>
>> With regards
>>  Ajay
>>
>> -- 
>>        -----------------------------------------------------
>>                        AJAY   KUMAR DASH
>>                        RESEARCH SCHOLAR
>>                        IOP - BHUBANESWAR
>>                        ORISSA ,    INDIA
>>          ---------------------------------------------------
>>

>
Received on Thu May 28 2009 - 15:40:31 CEST

This archive was generated by hypermail 2.2.0 : Thu May 28 2009 - 17:50:02 CEST