[ROOT] I can not zoom in/out when I use THStack class.

From: Harufumi Tsuchiya (harufumi@icrr.u-tokyo.ac.jp)
Date: Fri Apr 26 2002 - 04:40:40 MEST


Hello rooters,

I am using THStack class to draw some histograms in the same pad 
and I found I could not zoom in/out along y-axis but could do 
along x-axis. Following macro is a part of my macro. 
Something wrong ?

          :
          :
TCanvas *c = new TCanvas("c", "", 10, 10, 550, 750);
c->Divide(2, 3);
THStack *hstack_laxis[6];
Char_t hstackname[20];
for ( Int_t i = 0; i < 6; i++ ) {
  sprintf(hstackname, "hstack_laxis %d", i);
  hstack_laxis[i] = new THStack(hstackname, "");
  c->cd(i+1);
  gPad->SetLogx();
  hlaxis[0][i]->Sumw2(); hlaxis[1][i]->Sumw2();
  hlaxis[0][i]->Scale(1.0/nentries[0]); hlaxis[1][i]->Scale(1.0/nentries[1]);
  hlaxis[0][i]->SetLineColor(2); hlaxis[1][i]->SetLineColor(4);
  hstack_laxis[i]->Add(hlaxis[0][i]); hstack_laxis[i]->Add(hlaxis[1][i]);
  hstack_laxis[i]->Draw("nostack a ehist");
  gPad->Modified();
}
          :
          :
(hlaxis[2][6] are decleared and filled before this routine.)

I also checked hstack.C in $ROOTSYS/tutrials as well as my macro.
But, I could not get the zooming action along y-axis.

What method can I use for zoomig action when use THStack class.

I use ROOT v 3.03/04 on IRIX 6.5 and g++ 2.95.2.


Harufumi Tsuchiya.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:51 MET