Hi Harufumi, It was not possible to zoom with the mouse a THStack object. I have implemented this possibility (for 1-d and 2-d cases) in the current version in CVS. Rene Brun Harufumi Tsuchiya wrote: > > 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