Re: [ROOT] TH1::Draw, option HIST and fitted functions

From: Olivier Couet (
Date: Thu Feb 26 2004 - 16:12:08 MET


 By default when a 1D histogram contains errors it is plotted with errors 
bars whatever the plotting option is. This was like that in PAW and this 
way has been kept in ROOT. The idea was to make sure that the user knows 
his histogram contains error bars. If, nevertheless, one wants to not show 
the error bars and activate an other plotting option, the option HIST 
should be given in addition.

 I agree that I found no way to plot only the daughter function (in case 
of a fit for instance). In PAW the option FUNC was doing that. I tried it 
in root but it as no effect.

test() {
   TH1F *histo=new TH1F("aaa","bbb",25,0,100);
   for (int i=1; i<26; i++){

May be that option should be reactivated in the case of 1D histograms. In 
that case your two points will become:

 1) do not draw any error bars (option HIST)
 2) draw only the 'daughters', i.e. functions etc. (option FUNC)

 Cheers,       O.Couet

On Thu, 26 Feb 2004, Gero Flucke wrote:

> Hi!
> I am hit by the same problem as 'solved' in
> but I don't think that this is an appropriate solution in general,
> especially in the case where the draw option (TH1::SetOption("HIST")) is
> set somewhere in the program, fitting at another place and having a
> genaral drawing routine that is responsible for putting hists into several
> pads of several canvas  etc.
> I'd expect too different options that are now both 'merged' in option HIST:
> 1) do not draw any error bars
> 2) draw the histogram without its 'daughters', i.e. functions etc.
> Cheers
> 	Gero
> PS: Using old 3.05_07, but same in 3.10_02, on linux.
> -----------------------------------------------------------------------
> Gero Flucke
> 1a / 603
> Notkestr. 85
> 22607 Hamburg
> +49-(0)40-8998-2454

Org:    CERN - European Laboratory for Particle Physics.
Mail:   1211 Geneve 23 - Switzerland                     Mailbox: J25910      
E-Mail:                            Phone:   +41 22 7676522
WWW:                    Fax:     +41 22 7677155

This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET