Hi Dongwook, There are several options to draw a THStack object. See: http://root.cern.ch/root/htmldoc/THStack.html#THStack:Paint In your case, you should use the option "nostack" Rene Brun Dongwook Jang wrote: > > Hi, > > I found THStack is very nice and useful. But it didn't preserve > histogram shape at some point. > > When I tried like: > > TH1F* mc = (TH1F*) mcFile->Get("eTrack"); > TH1F* data = (TH1F*) dataFile->Get("eTrack"); > THStack* hs = new THStack("hs","variables 1"); > hs->Add(mc); > hs->Add(data); > hs->Draw(); > > where mcFile and dataFile are root file containing 1D histograms. > > When I swap the adding order, the drawn plots are different. I > understand the scales are different, but I think the shape at least > should be preserved, right? Both histograms have same x-range and same bins. > > Is it a bug or am I missing something? > Thank you. > > -- > > Best regards, > Dongwook Jang. > phone : 630-840-2118 (office B0 170-I) 630-840-6315 (FAX)
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:53 MET