Re: Drawing Histogram

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


On Fri, 19 Mar 1999, Piotr Świat 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

> 
> 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 = 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



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:30 MET