Re: Changing the scale of a histogram

From: suvayu ali <fatkasuvayu_at_gmail.com>
Date: Wed, 22 Sep 2010 17:59:58 -0700


Thanks a lot Rene! Works beatifully.

On 21 September 2010 22:50, Rene Brun <Rene.Brun_at_cern.ch> wrote:
>  double xmin = h->GetXaxis()->GetXmin();
> double xmax = h->GetXaxis()->GetXmax();
> double factor = 0.001;
> h->GetXaxis()->SetLimits(xmin*factor,xmax*factor);
>
> Rene Brun
>
>
> On 22/09/2010 01:18, suvayu ali wrote:
>>
>> Hi everyone,
>>
>> Is there someway to change the scale of an already existing histogram
>> by some constant multiplicative factor? In my case I had a histogram
>> with a log X scale in GeV, and I wanted to change it to a log X scale
>> in TeV. I have a feeling this is something very trivial but I couldn't
>> figure it out and ended up replotting the histogram all over again.
>>
>> Anyone has any suggestions I can try next time?
>>
>
>

-- 
Suvayu

Open source is the future. It sets us free.
Received on Thu Sep 23 2010 - 03:00:24 CEST

This archive was generated by hypermail 2.2.0 : Thu Sep 23 2010 - 17:50:01 CEST