Ivan, I cannot reproduce this problem. Could you be more explicit? I also suggest to use the PRO version 3.03/09 Rene Brun On Wed, 23 Oct 2002, ivan brida wrote: > hi Rene > > I corrected my program according to your suggestion and it works fine. > but if I save the canvas c (created with corrected program) into e.g. > c.c, this file contains similar lines as my original program and the > same approach via TH1F. and if I call this macro via .x c.c, the > original problem vith zooming y-axis arises. so the question is why does > root save canvases in such a way? > > ivan > > 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