Re: How to color part of a hisogram

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Thu, 13 Jul 2006 08:40:31 +0200

> Dear rooters:
> How can I color a given part of a histogram?
> Any suggestion will be appreciated.
> Thanks.
>
>
>

see example below

Rene Brun

{

   TH1F *h = new TH1F("h","test",100,-3,3);    h->FillRandom("gaus",5000);
   h->Draw();
   TH1F *h2 = (TH1F*)h->Clone("h2");

   h2->GetXaxis()->SetRange(40,70);
   h2->SetFillStyle(3001);
   h2->SetFillColor(2);
   h2->Draw("same");

} Received on Thu Jul 13 2006 - 08:40:37 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET