Re: Drawing Histogram

Otto Schaile (Otto.Schaile@Physik.uni-muenchen.de)
Fri, 19 Mar 1999 13:06:58 +0100 (MET)


On Fri, 19 Mar 1999, Piotr =8Cwiat wrote:

> 1. How can I supress/remove stats TextPave in histograms?

gStyle->SetOptStat(); // see doc for class TStyle

NB: please consult also release notes 2.21/08 for this

>=20
> 2. How can I set limims for X axis in TGraph?

you can do: (Note you first have to Draw() to get the hist
TCanvas * c1 ...
...
TGraph * gr =3D new TGraph(n,x,y);
gr->Draw("AP");
gr->GetHistogram()->SetAxisRange(600,1200);
c1->Modified(kTRUE);
c1->Update();

NB: as far as I know this works only with vers. 2.21/07 and later

cheers

---------------------------------------------------------------------------=
-
Otto Schaile Sektion Physik der LMU Muenchen
Phone: (+49 89)289 14070 Am Coulombwall 1, D-85748 Garching, Germany
FAX: (+49 89)289 14072 EMail: Otto.Schaile@Physik.Uni-Muenchen.DE