Dear rooters,
I am facing problem in setting range of the axis of the graph. For
this purpose, I had written a root scripts and attaching it (51.C). In
the scripts, I am trying to set the range of the X axis from (0,5).
But, it is taking the default one (0,2). I am also attaching the output
(graph.ps) that i am getting from the root script (51.C). Please let me
know the possible solution for it.
With best wishes ,
manoj
{
Int_t n=20;
Double_t x[n],y[n];
for (Int_t i=0; i<n; i++)
{ x[i]=i*0.1;
y[i]=10*sin(x[i]+0.2);
}
TGraph *gr1 = new TGraph (n,x,y);
TAxis *axis = gr1->GetXaxis();
axis->SetRangeUser(0,5);
gr1->Draw("AC*");
}
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET