Hi.
I'm producing a postscript file containing many pages, each with nine
plots in it. Each plot is the outcome of using TGraphErrors. Now, for
each plot, I would like to draw a line at a fixed
x range (xmin and xmax are known constants), but at a different y range
(ymin and ymax change from plot to plot). I've tried to use
ComputeRange method of TGraphErrors with no
success, see below please.... Am I doing something wrong?
//==========================================
float* afMoment = new float[nEntries];
float* afErrMoment = new float[nEntries];
float* afMass = new float[nEntries];
float* afErrMass = new float[nEntries];
.....
.... // inside a loop
....
TGraphErrors *gr = new TGraphErrors(nEntries, afMass, afMoment,
afErrMass, afErrMoment);
gr->SetTitle(szMom);
gr->Draw("ap");
gr->GetXaxis()->SetTitle("m ( #omega #pi^{-} ) [MeV]");
gr->Draw("ap");
Double_t min_mass, min_h, max_mass, max_h;
gr->ComputeRange(min_mass, min_h, max_mass, max_h);
cout << "min_h: " << min_h << "max_h: ' << max_h << endl; ====>
this line prints zero for min_h and min_max ???? why?
TLine *line1= new TLine(1235,min_h,1235,max_h);
line1->Draw();
//=========================================
Thanks,
mina
--
Mina Nozar
nozarm@jlab.org ----- Phone:(757)269-6391 ----- FAX:(757)269-5800
Thomas Jefferson National Accelerator Facility
MS 12H, 12000 Jefferson Ave. Newport News, VA 23606
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:40 MET