Re: problem with the origin of the cordinates using Add()

From: Gero Flucke <>
Date: Wed, 15 Feb 2006 08:34:23 +0100 (CET)

On Mon, 13 Feb 2006, nasim wrote:

> Sorry if my question is easy but I could not find the answer in web.
> If we want to substract two histograms using h2->Add(h1,-1)
> then the y origin move up and therefore the origin of the x and
> y coordinates won't be the same point. How can I fix this?

Hi Nasim,
I assume that you have 1D histograms.
You can set the y-axis limit as you like, i.e. h2->SetMinimum(yMin) and h2->SetMaximum(yMax).
If you want in general all 1D histograms by default to start with yMin = 0, you can call
gStyle->SetHistMinimumZero(kTRUE); // no zero-suppression on y-axis


        Gero Received on Wed Feb 15 2006 - 08:34:29 MET

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