[ROOT] THStack Limits

From: Matthew D Wood (mdwood@lotus.phys.northwestern.edu)
Date: Thu Jun 17 2004 - 23:35:27 MEST


Hi.  I am trying to draw multiple histograms on the same canvas using the
THStack class.  I notice that when I try to look at histograms on a log
scale the limits of the axis don't get set properly.  Below I include the
example code.  In this example the lower limit gets set to 100 so the
contents of the second histogram are not visible.  
	I am using the root version 4.00/04 with gcc 2.96 and RH
7.1.  Thanks for your help.

Matthew Wood

{

TCanvas *c1 = new TCanvas();
gPad->SetLogy();

TH1F *hist1 = new TH1F("hist1","hist1",100,0,10);
TH1F *hist2 = new TH1F("hist2","hist2",100,0,10);

hist1->Fill(1,1E5);
hist2->Fill(2,1);

THStack *hs = new THStack();

hs->Add(hist1);
hs->Add(hist2);

hs->Draw("nostack");


}



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET