Re: TH->Draw() Draw options question.

Anton Fokin (kosu_fokin@garbo.lucas.lu.se)
Wed, 17 Mar 1999 18:09:35 +0100


Hi Rene,

if I write

hist->SetDrawOption("COLZ");
hist->Draw();

it still draws with "" option. Moreover if I write

hist->SetDrawOption("COLZ");
printf("Draw option - %s\n", hist->GetDrawOption());

it doesn't print any "COLZ" at all, but just "". Could you explain how it
works or should work in reality?

Regards,

Dr. Anton Fokin

Division of Cosmic and Subatomic Physics
Lund University
Sweden

----------
> From: Rene Brun <Rene.Brun@cern.ch>
> To: Anton Fokin <kosu_fokin@garbo.lucas.lu.se>
> Cc: roottalk@hpsalo.cern.ch
> Subject: Re: TH->Draw() Draw options question.
> Date: den 17 March 1999 16:30
>
> Anton Fokin wrote:
> >
> > Hi there,
> >
> > I couldn't find if it's possible to set draw options for a histo
somewhere
> > outside TH.Draw()? I would like to have different options set for every
> > histo I have and let a histo draw itself with a corresponding draw
option
> > whenever I use a generall call to TH.Draw();
> >
> > Regards,
> >
> > Dr. Anton Fokin
> >
> > Division of Cosmic and Subatomic Physics
> > Lund University
> > Sweden
>
> Hi Anton,
> Yes, this is possible. Via TObject::SetDrawOption(const char* option)
> You can do:
> hist->Draw(some option);
> hist->SetDrawOption(another option) as many times as you want.
> SetDrawOption is called by the histogram DrawPanel widget.
>
> Rene Brun