Hi Ivan, Replace the following lines in your program: TH1F *hframe = new TH1F ("hframe","",10,1,10); hframe -> SetMinimum(0); hframe -> SetMaximum(10); hframe -> SetStats(0); g->SetHistogram(hframe); by g->SetMinimum(0); g->SetMaximum(10); Rene Brun On Wed, 23 Oct 2002, ivan brida wrote: > hi rooters > > I have problem with zooming the y-axis. I do this: > > { TGraph *g=new TGraph(10); > for (int i=0 ; i<10 ; i++) {g->SetPoint(i,i,i);} > g -> SetMarkerStyle(20); > TCanvas *c = new TCanvas("c","c"); > TH1F *hframe = new TH1F ("hframe","",10,1,10); > hframe -> SetMinimum(0); > hframe -> SetMaximum(10); > hframe -> SetStats(0); > g->SetHistogram(hframe); > g -> Draw("ap"); > c -> Modified(); > } > > the y-maximum is 10. if I zoom the y-axis interactively (e.g. y=2..5) > and then unzoom, the hframe->GetMaximum() returns the value 1. > this problem doesn't occur for x-axis. > > I use root version 3.03/08 20.8.2002, win 2000. > > could anybody help me? > > thanks > > ivan > >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:15 MET